3 replies [Last post]
dayladore
dayladore's picture
Offline
Regular
Trondheim
Last seen: 5 years 46 weeks ago
Trondheim
Joined: 2007-06-17
Posts: 18
Points: 0

Hi people of the css!

In all the other browsers ecxept ie6, the "space" appear between li class="main":




  • Mission statement


  • Structure

  • > Org.kart, ledelse

  • > Org.kart, prosjektgruppe

  • > Org.kart, driftsgruppe


  • Management and Board


  • Contact us





here is the css: http://dayladoredesign.com/ipublish/skeie/style.css

burlster
burlster's picture
Offline
Leader
Bournemouth
Last seen: 31 weeks 5 days ago
Bournemouth
Joined: 2007-05-31
Posts: 692
Points: 43

I believe tags aren't

I believe BR tags aren't considered ideal anymore. I would consider using the 'margin' property in your CSS to space things out a bit better.

Cheers,

John

Have YOU said Hello yet?
The CSSCreator Hello Thread

Ed Seedhouse
Ed Seedhouse's picture
Offline
Guru
Victoria British Columbia
Last seen: 11 weeks 6 days ago
Victoria British Columbia
Timezone: GMT-7
Joined: 2005-12-14
Posts: 3570
Points: 675

Your code is not legal html,

Your code is not legal html, so there is no "right" way of displaying it, so you have no basis to expect any particular result. Within a list (OL or UL) the only first-child element that is legal is the LI element. Any other child elements may only be placed within LI elements.

Your BR's are outside, so there is no standard you can expect any browser to live up to. There is no standard rendering for illegal html. That's why we insist on people validating their code before they post there questions. If you had submitted that code to a validator and your question then might have been "why does the validator complain about this?" rather than the one you posted.

In any event spacing LI elements (or any others) out that way is bad, bad coding practice. Use CSS to put margins on your LI elements to space them. Margins are used to space elements with CSS and BR should never be used for that purpose. Not ever.

In general, except for a few very special exceptions, you should avoid the use of BR in your code altogether.

Ed Seedhouse

Posting Guidelines

Watch out! I am carrying irony, sarcasm and satire, and know how to use them.

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 1 year 1 week ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

You can't wrap your list in

You can't wrap your list in a <p> either.

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference