I had a image navigation setup using UL, LU and background images for the navigation. It looked good until I added this code above my html code. Now its like there is no CSS at all. Why did this mess up my code? Thanks!
<!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" dir="ltr" lang="en-US">
Well, first off if you are
Well, first off if you are actually using LU tags, that might be one reason... as they don't exist.
Second, can you please provide a link so we can see what is going on?
A DTD makes all the difference
I built a couple of sites before I knew about DTD's and I got the looking fine. It wasn't until I wanted to make my page display in the center of wider screens, and asked a friend how to do it. He told me to use margin:auto; so I did, and it still wouldn't work. he took a look and told me to use a DTD. Sure it made my page display in the center of the screen but a couple of other things went terribly wrong.
When the problems became apparently very difficult to fix, I temporarily removed the DTD and redesigned the site using it.
A little while ago I was building another site, and my html editor looks like it starts witha DTD in place, so I cracked on. When I couldn't get a certain feature to work no matter what, I looked at a site I had used that feautre on in the past, that is when I realised I didn't have a DTD, put it in and the feature worked fine.
DTD's make making sites cross-browser compatible more easy, but if you build a site without one, sometimes you're better to start a fresh.
Maybe Deuce will be able to help you more than I.
Ya, the DTD can cause what
Ya, the DTD can cause what you might consider an issue or problem but it is actually rendering out how you told it to. Best bet is to provide us with a link and if you don't have a link at least post all of your HTML and CSS (all of it) so that we can see if we can figure out what is happening.