PDA

View Full Version : why??


Zozart
06-01-2003, 16:12
Why will opera not take note of my break class? the class is..

.break {

font-size: 3pt;
line-height: 0.75;
}

and the navigation bar is set out like so (example):

<a href="link1">Link 1</a><br>
<br class="break">
<a href="link2">Link 2</a> And so on..

Every browser except opera is leaving a nice sized gap between the links, whereas opera is completely ignoring the fact the break has a class attached to it! Thanks!
:confused:

Forthy
07-01-2003, 22:59
I don't know mate! :rolleyes:

FLiX
08-01-2003, 11:04
Me either?

:(

AlastairM
08-01-2003, 13:52
possible that opera doesn't support line-height on breaks or its possible that the other browsers are wrong since a <br> doesn't really have any properties, it's a line break.

There is a better way, depending on what your doing

try:

.break {
display:block;
margin-bottom:5px;
}

and

<a class="break" href="link1">Link 1</a>
<a class="break" href="link2">Link 2</a>

the displal:block turns the a elements into block level elements so the have a forced line break anyway, the bottom-margin (or top or a combination) allows you control over the spacing.

You can also change the html to:

<a class="break" href="link1">Link 1</a><span class="divider"> | </span>
<a class="break" href="link2">Link 2</a><span class="divider"> | </span>

and add the follong to your css:

.divider{
display:none
}

This will show '|''s between the links when css is disabled and makes it a bit more readable.

cheers

alastair

Zozart
08-01-2003, 15:29
aha! thanks Mr. xhtml :D it's working much better now! :)