css

How can I develop a CSS based layout that is 100% browser compatible?

We are in the process of creating a few layouts for various external and internal websites. One of the developers is using the not-so best practice of switching his CSS file (one for FF and one for IE) based on the user agent. :/ Others are sticking with table based layouts because they are browser compatible. I would like some minor ...

How can I hide a TD tag using inline JavaScript or CSS?

How can I hide a <td> tag using JavaScript or inline CSS? ...

Put icon inside input element in a form

How do I put an icon inside a form's input element? Tidal Force theme Got me? ...

Helvetica Neue baseline rendering problem with Firefox/Mac

Consider this HTML: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <style type="text/css"> body { font...

How can I reference the first occurence of a given selector in CSS?

HTML: <div class="foo">firstBar</div><!-- give this one a different style --> <div class="foo">secondBar</div> <div class="foo">thirdBar</div> CSS: .foo { font-size: 12pt } Without editing the existing HTML, is it possible to somehow reference the first occurence of the class "foo" and give it a different style? ...

Firefox addon or other tool to locally validate HTML pages

I have a rails project with a lot of duplicate id's (it looks like id's were used like class should have been used), so obviously this is bad. I need to refactor everything to get rid of the duplicate id's, and need some addon for Firefox (ideally) to validate the page as I view it to ensure there are no duplicate id's, since it's not s...

Firefox 1.5 and 2 css absolute position bug

I have the following html/css that is causing problems in Firefox 1.5 and 2, but is working correctly in IE6/7/8, Safari, Chrome, Opera and Firefox 1 and 3. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt; <html> <head> <title>Firefox Bug</title> <style type="text/css"> * { border: 0; paddi...

What is the value of the css 'ex' unit?

(Not to be confused with Xunit, a popular .Net unit testing library.) Today in a fit of boredom I started inspecting Gmails dom (yes, I was very bored). Everything looked pretty straight forward until I noticed an interesting specification on the widths of certain elements. The illustrious googlites had specified a number of table cols...

Is there a reliable way to position content off to the sides of a div, and have it only appear if the user's resolution allows it?

I have my markup like this (for argument's sake) <div id="content"></div> <div id="layout"></div> <div id="layout2"></<div> Then I use this CSS #content { width: 800px; height: 600px; margin: 0 auto; } /* place this attached to the top of the page */ #sidebar, #sidebar2 { display: block; width: 139px; height:...

css full height?

I am building a 3 column web page (header & menu bar above a left nav, main area and right sidebar with a full width footer on the bottom). I have background colors for each column but they cut off at the end of the text instead of filling the whole column. Is there a way to fill the whole column that does not rely on using a table (td...

IE space between rows

My site looks very different from FF and IE (http://www.kiubbo.com), as you can see there its a lot of space between ".news_item" lines in IE 8 If anyone has any idea why? Thanks ...

How to make div having rounded corner with two colors??

Hi every body!! Can anyone suggest me how to create div with rounded corners but with two different color like in this example Here is the code I have used to make div with different color but did not work CSS: .roundcont_n { width: 250px; background-color: white; color: #000; } .roundcont_n_u { width: 250px; ba...

Javascript/CSS Disable text select

Hello, I am trying to create a text button using simple span and formatting the text and providing onclick behavious. The problem is when a user clicks on the button, it sometimes highlights the text of the button. I want to avoid such behaviour because it looks damn ugly when the text is selected. Any css/javascript/(jquery) i can use...

Creating colored bars for poll results

In my web app I'd like to display poll results with colored bars with length proportional to the percentage of votes. How can I achieve this with HTML/CSS? ...

Nested UL/LI not shown

<ul id="nav"> <div id="navspacer" /> <li class="button" style="width: 109px;"></li> <li class="button" style="width: 86px;"> <img alt="Webdesign" src="images/digifolio_10.jpg"/> <ul> <li>a</li> <li>b</li> <li>c</li> </ul> </li> </ul> <div id="main"> content </div> li.button has a fix...

What does this CSS value mean?

While viewing the source of a web page, I came across this CSS, applied to a span within a button: .whatever button span { position: absolute; left: -1e+7px; } What does left: -1e+7px; mean? Is this some trick I should be aware of? ...

Safari image rendering bug

Has anybody else encountered this. Whenever the images are intially loaded by the browser it only shows the last-half of the image. Then when I mouse over anywhere in the green section it immediately displays the rest of the image. What you're seeing here is a <div> with a background-image and a <img> located within said <div>. I'm e...

CSS Sprites images rendered with bad quality in IE

I have a CSS image sprite and this renderes perfect in FF, also IE. The problem is the rendered image looks to have poor quality in IE. Has anyone encountered this before? How did you fix it? I need CSS sprites to save bandwidth and requests. .blackmncenter2 { float:left; height:32px; line-height:32px; background-imag...

A bug in CSS identifiers for AS3?

I'm not sure if it's a bug, but is there any way to target the "class" or "id" identifier to style heading tags (h1 to h6) using ActionScript 3.0 CSS? It works fine with all the other tags. eg.: <p class="style1">text</p> // I can use .style1 or p in the CSS <h1 class="style2">text</h1> // I can't use .style2 in the CSS, only h1 ...

can i tilt an image easily using HTML or CSS?

some designs on the Apple's user's webpage show a photo that is tilted slightly, like at a 5 or 10 degree angle. while this is no big deal, it does make the webpage totally different from "all the rest". is it true that currently using HTML or CSS, this can't be done yet? like the big photo in the middle: (the program lets you choo...