3 replies [Last post]
akgbob
Offline
newbie
Australia
Last seen: 13 years 42 weeks ago
Australia
Joined: 2007-07-10
Posts: 4
Points: 0

Hey guys,

Thanks for any help, and I do appologize if this questions been asked before. I found similar ones about white-space, but none seem to match what the answer I need.

I've been working on keeping the site I'm working on XHTML strict. My navbar was working/layed out properly, then once I added the doctype to the top of the page, it suddenly created spaces between each of the images on my Navbar. Everything else works fine, but no matter what properties I try, I can't seem to remove the spaces.

Some reason it still looks fine in IE, but Firefox and Safari show the spaces.

See the current example here: www.leenaeats.com/home.htm

Thanks for any help!

Cheers

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 6 years 18 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

One important point; you

One important point; you must not add a DTD in at a later point in time, it must be there from the off it has the effect of a switch turning on or off a browsers rendering mode where you will see noticeable differences in how properties are handled. If it's not there to start with then you will write rules and state property values that suit a certain visual rendering that you are seeing, then place the DTD and the nature of the rendering changes and your page suddenly will look out of wack.

To the problem:

try adding #topmenu img {display:block;}

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

akgbob
Offline
newbie
Australia
Last seen: 13 years 42 weeks ago
Australia
Joined: 2007-07-10
Posts: 4
Points: 0

Solved

Thanks Hugo!

Yeah, it was one of those “learned the hard way” moments. I knew it needed to be there but it didn’t even occur to me that it wasn’t there until I started validating.

Some reason adding the Display: Block to my topmenu div didn’t do it, though adding it to my Nav class did the trick.

Cheers!

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 6 years 18 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

I may have written the wrong

I may have written the wrong descendent grouping but it's the img element that requires the property

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me