Skip to content

Html 4.1 Makes CSS Names Case Sensitve

September 7, 2009

We recently had to change a bunch of pages to make sure that IE and Firefox rendered them in standards mode to support some Ajax controls. It’s simple enough to add the doctype and an x-ua-compatible line for ie. What shocked me was when it broke our image buttons. They were linkbuttons with totally valid css behind them. The css validated from css 1 to 2.1 and I was baffled until I noticed the button was rendering correctly on one page where by rights it shouldn’t.

I fired up developer tools in ie8 and firebug and saw that on the bad pages the proper class wasn’t getting picked up by the buttons at all. WTF!?!

Then I saw it. The name of the class on the good page was case sensitive while all the others were capitalized. Could it be so simple? Yea, yeah it is.

tl;dr If you’re doing a page in HTML 4.1 standards, make sure you css classes observe case sensitivity.

Advertisement
No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.