html

Get the html control with attribute inside a string

I have a string like these: String data = @"<table id="_grp:CONSUMER_APPLICATION" cellpadding="0" width="660"> <tbody> <tr> <td> <table id="_headerTable" class="Dark" cellspacing="0" cellpadding="0" width="660" border="0"> Application Form sjfjsdkfj General Data Customer ID/Numri identifiku...

How to calculate the offset() of an <li> relative to its parent container

I have a <li> which is nested inside a containing <ul>, what I would like is to calculate the offset. But have the top-left corner of the <ul> be 0, 0. So my HTML is: <div style="margin: 0 auto; width: 760px; height: 760px; overflow: hidden;"> <ul style="width: 2000px; height: 2000px; min-height: 2000px; position: relative;"> ...

How not to load all images on a page on load

I have a page with a list of jpg images on the page. The div that contains images is hidden and works as images source for Galleria jQuery image gallery plugin. So, when I load a page, it takes long to load it because it loads all images. Is there a way not to load all these images on page load, but just when galleria needs them? ...

Can I do away with this highlighting in HTML?

Whenever we select some text, the entire text area gets highligted. like this . but is there any way to do away with this highlighting? I want just the color of the text to change and not the area to be highlighted as it appears in the image? am I clear enough? ...

deploy website to cd - paths

hi what's the best way of porting a static HTML website to a CDROM, to allow users to insert the disk, copy the files off, and then run the site "offline", as it were. what sort of path structure should i use? at the moment all of the assets are like: file:///C:/Users/User/Desktop/MySite/index.html which obviously isn't very portable...

jQuery z-index doesn't work

Hi, i have a menu and on hover i fade a box in. Behind this box i have a small icon and i want to move it in front of the box so you can see it on hover. Here is my menu > Navigation I tried it with that jQuery(this).find(".flyer").css("z-index", 10000); but it stays behind. How could i manage that problem? greets Max ...

How to detect file drag on HTML page

I can detect if a file is being dragged on a div by listening to 'dragover' event. But how can I detect if a file is being dragged over the whole HTML page? document.body does not seem to raise the 'dragover' event. What I intend to do is as soon as a file is dragged over a page, I'll show a hidden div to drop the file on. Just like Gma...

Simple 2 column layout

Hi! I've been trying to get this right for the last 3 days now... All I want is simple 2 column layout on my website with the menu bar on the left. The problem is I can't get the content column to display in line with the menu column. No matter what I try, it only lines up with the menu column's bottom border. I'd use negative margins,...

How DOM works/is loaded? (in HTML)

Hi All! How DOM is loaded in a html page? First is load the all html tag ( ) and inside of this element is created an other element and so on or first is create followed by ... and finally, the closing tags are added? Thank you! ...

HTML-CSS position problem with div

I got a little problem and nothing I test seems to work. My HTML: <div id="parent"> <div id="top_parent">Top_background <div id="top">Top_Picture</div></div> <div id="content">Here comes random stuff<div> </div> <div id="bottom">Footer</div> CSS: #top_parent { background:#f00; height:100px;...

new google images how do they float correctly

Has anyone seen the new google image search. It manages to make the images float in an area. the images fit into this correctly by grouping them in the sizes. Frog images I guess there are two ways of doing this: Scripting by some sort of rule involving the widths and heights of these images A Css rule for creating the images. In ...

Set fixed TD height?

<table> <tr> <td>4px</td> <td>4px</td> <td>4px</td> </tr> <tr> <td colspan="3">content</td> </tr> <tr> <td>4px</td> <td>4px</td> <td>4px</td> </tr> </table> I can't set the td's to 4px height using CSS. ...

What characters are allowed in the HTML Name attribute?

I have a PHP script that will generate <input>s dynamically, so I was wondering if I needed to filter any characters in the name attribute. I know that the name has to start with a letter, but I don't know any other rules. I figure square brackets must be allowed, since PHP uses these to create arrays from form data. How about parenthes...

Adding HTML elements with JavaScript

So, if I have HTML like this: <div id='div'> <a>Link</a> <span>text</span> </div> How can I use JavaScript to add an HTML element where that blank line is? ...

Webkit reflow problem when dynamically changing border to DOM element.

I have two div elements where one wraps around the other. Then I use JavaScript to add border to the outer div in runtime. Somehow webkit based browser doesn't do a reflow when the outer border is changed. The end result looks ugly - the inner div overflows the outer. Here is the HTML code: [div id="outer][div id="inner" style="border: s...

HTML Email jump links not working

Hi, I've written a HTML Email using tables (:sad face:) and it displays perfectly while using Internet Explorers Send -> Page by Email. My issue is that my jump links <a href="#jumplink">Go to the jump link</a> no longer work, thye just open the complete URL of the page that I was sending. I've looked through the source of emails in...

right click on html link which execute javascript

When i click a link, i want to execute a javascript function to get the dynamic url. So i did like below. <a href="javascript:myredirect()"> a link </a> With this code, I cannot see the default context menus provided by browsers like 'open link in new tab' or 'open link in new window' when i right click the link. I tried like below to...

Weird CSS issue involving inline overrides in IE

edit: Thanks, missed the doctype. ...

Background Image not appearing. IE6 Fail.

Hello all, I know this is a common problem with IE6 from my Google search but everything I have tried has failed. Here is my HTML: <table width="750" border="0" cellspacing="5" cellpadding="5" class="largetable" > <tr> <td width="65px"><b>SELECT</b></td> <td class="plus" width="300px"> <select id="op" name=""> <op...

Running into an issue trying to extract the text from a snippet of HTML

i am using the HTML Agility pack to convert <font size="1">This is a test</font> to This is a test using this code: HtmlDocument doc = new HtmlDocument(); doc.LoadHtml(html); string stripped = doc.DocumentNode.InnerText; but i ran into an issue where i have this: <font size="1">This is a test &amp; this is a joke</font> ...