3 replies [Last post]
dayladore's picture
Last seen: 12 years 35 weeks ago
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's picture
Last seen: 26 weeks 1 day ago
Joined: 2007-05-31
Posts: 693
Points: 45

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.



Have YOU said Hello yet?
The CSSCreator Hello Thread

Ed Seedhouse
Ed Seedhouse's picture
Victoria British Columbia
Last seen: 17 weeks 20 hours ago
Victoria British Columbia
Timezone: GMT-8
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's picture
Last seen: 6 years 35 weeks ago
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