css

jQuery1.3.2 change multiple same name class only use css(name, value) method. don't use css(name)

looking at the snippet. If you want to use jQuery css method change class LabelHeader both IE and FF, you only use each mehtod + css(name,value). $("document").ready(function() { var cssObj = { 'width': '500px', 'height': '460px' } var cssLabelHeader = { '...

Why isn't this XHTML valid?

Why isn't this XHTML valid? The HTML: <h2>earthquake warning <span>Posted 03/11/2009 at 2.05pm</span></h2> The CSS: h2 { font: bold 20px Arial, "Helvetica Neue", Helvetica, Geneva, sans-serif; padding-bottom: 5px; padding-top: 5px; text-transform: uppercase; } h2 span { font-weight: normal; text-transform: none; display: inline; } ...

stop Table Inheritance

I'm trying to figure out how can I have a table within another table such that the child table does not inherit the styles of the parent table... If I have a table with <table align='center' class='tab1' .... <tr> <td> ...<table class='tab2' .... .tab table, .tab th, .tab tr, .tab td { padding: 0; margin:0; vertical-align: top; font...

Why are table based sites bad for screen reader users?

How much easier is it for screen readers to handle <div> based websites as opposed to older <table> based websites, and why are they worse? ...

CSS Parent DIV Overflow

I have a problem with a website I'm putting together. I have a simple div layout. Which is as follows: <body> <div id="Container"> <div id="Logo"></div> <div id="Banner"> <div id="Nav"></div> </div> <div id="Content"> </div> <div id="footer">Footer</div> </div> </body> And my CSS is as follows: @charset "utf-8"; /* CSS Docum...

How to switch from table to div for FORM layout?

I'm noticing most folks are talking about using DIVs and CSS for label, textbox pairs. How would one convert a table such as: <table> <tr> <td><some Label1> </td> <td><some TextBox1> </td> </tr> <tr> <td><some Label2> </td> <td><some TextBox2> </td> </tr> ... </table> From using a table into say a div with CSS, a sample would be help...

PHP stylesheet print switcher problems?

I have this print style sheet switcher i created a long time ago and know it wont work for some reason, its suppose to switch to a print style sheet when the link is clicked and display the print dialog box. But know it will only display the dialog box in FireFox and not in any other browser and will not display the print style sheet at...

How to remove unused CSS class in my product?

I just want to remove an unused CSS class in my product. It's not a HTML file. It has .jsp XML and .js files. There is a lot of unused classes in my product. Removing them manually is taking a long time. Dust-Me Selectors is a Firefox add-on tool. It's showing only the current page. It's suitable for only HTML files. Mine are all dynami...

PHP stylesheet print switcher problem revisited?

Okay I have this style sheet switcher which will only works if I leave out the media="print" from the style sheet link. I was wondering how can I fix this problem without leaving out the media="print" attribute. Here is the PHP code. <!-- Print Script --> <?php if (isset($_GET['css']) && $_GET['css'] == 'print') { ?> <meta name="robot...

The modern way to clear floated content?

What's the modern way to clear floated content these days? There's the "recent" modern way of adding a ".clearfix" on the parent element to clear the contained floats and that would work great. In fact, this is my favorite method and still use this on any site I touch. It makes every browser render correctly. However, I know it's sort ...

nokogiri multiple css classes

How is it possible to select an html element that have two classes. For example, hot to select the element p bellow in an html document (given that it has two css classes) class='class1 class2' : I tried to use the following : doc.xpath("//p[@class~='class1 class2']") doc.xpath("//p[@class~='class1']|[@class~='class2']") doc.xpath("...

Is there any negative issue if we use `overflow:hidden` to clear float?

Is there any negative issue if we use overflow:hidden to clear float. is it cross browser compatible IE 6, 7 , firefox , safai etc.? Is overflow:hidden enough or we need to add Zoom:1 too to make compatible with IE? Is this way better than .clearfix to get cross browser compatibility? ...

jQuery blur with an exception

I have set a focus event on an input element. When there is a focus, jQuery searches for a div and displays it. That works. Wit the blur event on the same input element I make the div hide, which also works. But when I click on a link or want to select text in the shown div, it immediately disappears because of the blur event. How can i ...

Inline Content CSS Property

Hello All, Is it possible to use CSS's 'content' property using inline CSS something like this: <p class="myclass" style=".myclass:after:content = 'my content here'">Hello There !!</p> ...

Making right div repeat background based on left div's height

I have two div's in a container div, one floating left, one floating right. I have a php function for a search engine that spits out results, into the left div. what I need to do is have the right div repeat the background based on the height of the varied results on the left div. I have no idea how to go about this, any ideas? Right n...

Absolute bottom positioning in relative div

I want to position "rightBottomPart" to the bottom of "rightPart" and I want "rightPart to be as high as "leftPart". The problem is that I don't know the height of the content in "leftPart" and therefore I can't set the height of "text". (Height in "text" would solve it) Right now it looks like this: and I want it to look like this: ...

Margin on child element moves parent element

I have a div (parent) that contains another div (child). Parent is the first element in body with no particular CSS style. When I set .child { margin-top: 10px; } The end result is that top of my child is still aligned with parent. Instead of child being shifted for 10px downwards, my parent moves 10px down. My DOCTYPE is set to ...

Text in disabled and css styled button shows movement in IE

Hi. It's pretty much what the title says. I have disabled and css styled buttons. In Firefox, disabled buttons do not move at all when pressed (which is what is expected), in IE, the text in the buttons still moves a few pixels. Anyone know why this happens and more importantly, how to make disabled styled buttons actually disabled in ...

HTML / CSS table with GRIDLINES

how do I display the gridlines in a HTML table? (am using IE6) ...

Why does select with onfocus not work in IE?

I want to highlight a select element with a background color to indicate, it is mandatory. When the user opens the menu by clicking on it, I want to remove the background color, so it looks nicer and is more readable. This works just fine in Firefox, Chrome and even IE6, but on IE7 & 8 the pulldown doesn't open on the first click (or is ...