html

Does the percentage value refer to the width of the containing block?

Hi, We can set the padding and margin properties of an element E using either pixels or percentages. A) I assume that when we use percentages, the percentage value refers to the width of the containing block? Thus, if E is declared directly inside <body> element, then the containing block is <body> and percentage value refers to widt...

z-index and javascript events

So I have a couple of divs overlaid on eachother with differing z-index values. The default behaviour for browsers seems to be the event bound to the top-most z-index div gets fired. Ie I have multiple onclicks one for each div but only the top one is fired when the area is clicked. Is there a way to fire the events attached to all di...

List images in HTML table using 'float: left'

I have a number of images of very differing height and width that I need to display in a web application's dialog box. Putting the images into a table won't look good, as some very wide images will stretch the whole column, producing a ridiculous looking result. Making all images float: left comes very close what I want to achieve: All...

<strong> vs <em>?

What is the difference? both emphasize the text . <em> shows text as italics, is this the only difference? ...

is it possible to fix html that has unescaped < and > characters?

For example if I have this html: <div>this is a test < text</div> the < after the test is an error and the right html should be <div>this is a test &lt; text</div> But I have a lot of html files that by error were not encoded and i need fix this error so i can parse them later. The original source of data is not available so the...

How to increase the angle of italic text?

I want to make a logo using html css. Can we increase the angle of italic text using css or javascript? ...

[html/css] Forcing items to stay on same line

This should be fairly simple, but I have not been able to find anything usefull when google-ing. What I have is some text and some icons that I want to ensure that stays on the same line. For example I want this: Text goes here and eventually we run into the end of the line [text][icon] or this: Text goes here and eventually we run i...

should we use frameset doctype if we use iframe?

Why iframe declared as non-standard thing? It has usefulness. Is it allow to use in xhtml 1.1 ? or should we use frameset doctype if we use iframe? ...

Setting (or Reading) value of Cursor/Caret in HTML TextArea

I am trying (and failing) to implement a drag&drop mechanism into an HTML textarea. Drag&Drop mechanism is relatively easy with jQuery or Scriptaculous (we use both), so I am willing to accept an answer that uses either of these two. Problem is, I cannot seem to find a way to read or set the insertion point. What I ultimately want t...

Is there any kind of CSS library out there?

I was wondering if there are any kind of CSS libraries like a Yahoo CSS Library? Basically I am looking for something akin to JQuery but for CSS instead of JavaScript. ...

menu with jquery

I want to make a menu for the admin side of a website and when I saw the top bar of stubleupon I wanted to make a menu with same style, always on top even when you scroll down, and has drop down items. here is the link to sumbleupon exemple : http://www.stumbleupon.com/su/2qQfq3/www.thevirtualpiano.com/ and I am not very good in javascr...

Show window inside any web page

Hi, I want to implement a utility for myself that should provide a small console where I can execute random JS in any browser (much like Firebug's console - I don't reinvent the wheel, I just want to do something I need and just have fun doing it). So the usage use-case would be this: Click a bookmarklet from any browser. It show...

Block alignment woes with IE7, how to solve?

Unfortunately I have to support IE7 (and preferably IE6) In IE8, Safari, Firefox, Chrome, I get a perfectly good layout ujsing an outer div to enlose two boxes. ------------------------------------ | | | -------------- ----------- | | | | | | | | | A | | B ...

No linebreak in ASP.NET

Hi, just wanna ask is it possible to remove the linebreaks? Now I want to have a row of textbox, buttons and a combobox, but the combobox will be at new line when I run the application. So is there a way to stop it from going to a new line? Thanks. ...

Getting the label of "this" in jQuery

The following is my code for changing the color of the label of the input field in focus: $(document).ready(function() { var name = $(this).attr("name"); $(".comm-input").focus(function() { $("label[for=name]").css({"color" :"#669900"}); }); $(".comm-input").blur(function() { $("label[for=name]").css({"color" :"#999999"}); });...

Table item vertical-alignment change when adding control inside TD

I have been wondering about this. Why does the alignment of the td gets affected when placing controls inside it. For example. <tr> <td>Row 1</td> <td> <input type="text" /> <input type="button" value="Select" /> </td> <td>Selected Value 1</td> </tr> <tr> <td>Row 2</td> <td colspan="2"> <input type="text" /> ...

PHP Mixing server code with HTML output

I'm coding up a small script that'll take form data and do something with it. If it fails, it shows the error and the form again. If it succeeds, it'll show a success message. The backend code is using classes that'll throw exceptions if there's an error with the form data. The calls to the classes will be wrapped in a try{} catch{}. W...

Chrome Browser Action click not working

I am trying to create chrome extention, however my browser action click does not work! I've tried pretty much everything. Here is my setup: manifest.json: { "name": "blah", "version": "1.0", "description": "blah", "browser_action": { "default_icon": "icon1.png", "popup": "popup.html" }, "permissions": [ "bookmarks", "tabs", ...

HTML-CSS: Is it really necessary to use "inherit" value for the style properties in HTML design?

My question is straight: why there is "inherit" value for (almost) all the properties in HTML-CSS .. even-though all browsers support inheritance for all (as per my observation, yes, all) the properties .. When I asked google about it .. I could come up with a statement saying "Even though certain characteristics are inherited aut...

How can I extract HTML table data using Perl?

Hi Guys, I need to retrieve some data from a web page. After analysing the HTML code of the page, I found the data I need is embeded in a table with a unique table id. I don't know whether it is an HTML rule or not, anyway it's very good for parsing I think. The data in the table is arranged as below (various attributes and tags hav...