When I define a Doc Type in my HTML file the colors don't show from my CSS sheet...?
The div positioning (header, left bar, main, footer) is still correct but everything on my page turns white when I paste the Doc Type at the top of my HTML file. I'm copying the doc type information directly from W3C. Why do the background colors of the header, left bar,and footer only show when I do *not* have a Doc Type??
Public Comments
- I think you might have an error in the <html> portion of the Doc Type. as you can see <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> is one tag, it is basically your HTML tag with an xmlns attached to it, not a seperate tag. If that doesn't work try validating it on the w3 website. If it validates I say go with the old 'If it works fine, it is fine.' I hope this helps because I have had small problems like this before and we all know how annoying they can be xD Good luck man, send me an Email if you still need help. Cookm0803@yahoo.com <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <title>Title</title> </head> <body> </body> </html>
Powered by Yahoo! Answers