Monday, February 18, 2008

css and xhtml

i've been interested in both css and xhtml for some time now. the majority of my work is in reporting, and it hasn't led to much work with either. my current project is refactoring an exisitng application. i decided while i am having to dig into the view of this application to improve error handling, that i would remove all styling and place it into a css file. i have enjoyed doing this. it has been pretty simple, but fun none the less.

this even lent itself asking advice from chris coyier at css-tricks.com. i wasn't really sure what to expect, but he responded to my email. it appeared that he spent more than 5 minutes in his response as well. pretty cool. i guess that just goes to show that he's a cool cat.

so with the styling taken care of, i made sure that the only thing left was xhtml compliant. well, this is true for the part of the view i was working in. since there is other code in the rest of the template, and i haven't attacked the template yet, i've still got some work. at this point though, i've got several div's, some tables, some links and some breaks. pretty compliant. everything is in lowercase.

well.. not everything. here is what i think is funny. xhtml states that all tags and attributes are to be in lowercase. since xhtml is strict and case sensitive, it is important. what i find so humourous though is the doctype declaration. one of the following three must be used:

< !DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


< !DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


< !DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">


notice all of the capital letters? i just find it humorous.

No comments: