3 replies [Last post]
drphK
Offline
Regular
Last seen: 12 years 41 weeks ago
Timezone: GMT-4
Joined: 2009-01-22
Posts: 18
Points: 2

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">

Deuce
Deuce's picture
Offline
Guru
Somewhere, USA
Last seen: 5 years 4 weeks ago
Somewhere, USA
Timezone: GMT-5
Joined: 2005-11-20
Posts: 4424
Points: 1843

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?

all » http://dictionary.reference.com/browse/all

Google isn't a bunch of guys reading and grading web sites, it's more like a bunch of monkeys sniffing food and putting the good bananas at the top. -Triumph

ljbailey
ljbailey's picture
Offline
Enthusiast
Scotland
Last seen: 11 years 39 weeks ago
Scotland
Joined: 2009-01-10
Posts: 224
Points: 59

A DTD makes all the difference

Hi,

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.

Liam Bailey is director of Galloway Web Services, a Stranraer web design company, sister of SEO copywriting services company Write About Property.

Deuce
Deuce's picture
Offline
Guru
Somewhere, USA
Last seen: 5 years 4 weeks ago
Somewhere, USA
Timezone: GMT-5
Joined: 2005-11-20
Posts: 4424
Points: 1843

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.

Thanks

all » http://dictionary.reference.com/browse/all

Google isn't a bunch of guys reading and grading web sites, it's more like a bunch of monkeys sniffing food and putting the good bananas at the top. -Triumph