Opera mirror margins bug

N

Nik Coughlin

Hi, I've run into the Opera mirror margins bug as described here:

http://www.quirksmode.org/bugreports/archives/2006/01/mirror_margins.html

It's been fixed in Opera 9 but it still produces an ugly gap in my layout in
Opera 8. I know it's a small proportion of the market but I am a pedant.

The "fix" listed at the page above doesn't work for me, it's not really a
fix and it creates its own issues.

Does anyone know how to either:

Serve CSS to just Opera < 9 *without* browser sniffing as I don't consider
it reliable enough, something like the * html hack but for Opera rather than
IE

or:

Work around this bug?

I can post an url if need be, but it's not on the web at the moment.
 
N

Neredbojias

Hi, I've run into the Opera mirror margins bug as described here:

http://www.quirksmode.org/bugreports/archives/2006/01/mirror_margins.ht
ml

It's been fixed in Opera 9 but it still produces an ugly gap in my
layout in Opera 8. I know it's a small proportion of the market but I
am a pedant.

The "fix" listed at the page above doesn't work for me, it's not
really a fix and it creates its own issues.

Does anyone know how to either:

Serve CSS to just Opera < 9 *without* browser sniffing as I don't
consider it reliable enough, something like the * html hack but for
Opera rather than IE

or:

Work around this bug?

I don't see any "bug" in Opera 8.54. The bottom margin and the following
top margin simply collapse into one another; if the bottom margin is
greater than the top margin, its height will establish the spacing,
otherwise the top margin's height will.
 
N

Nik Coughlin

Neredbojias said:
To further the education of mankind, "Nik Coughlin"


I don't see any "bug" in Opera 8.54. The bottom margin and the
following top margin simply collapse into one another; if the bottom
margin is greater than the top margin, its height will establish the
spacing, otherwise the top margin's height will.

Right, looks like I have to post an url then:

http://nrkn.com/ia/

You'll note that #navigation li has margin-top: 4px;

In Opera, nothing else, just Opera, the #navigation li also has a 4px bottom
margin - it echoes the margin-top (hence Opera mirror margins bug).

Removing margin-top: 4px removes the bottom margin as well. Setting the
bottom margin to 0 has no effect.

Cheers
 
S

Spartanicus

Nik Coughlin said:
Hi, I've run into the Opera mirror margins bug as described here:

http://www.quirksmode.org/bugreports/archives/2006/01/mirror_margins.html

It's been fixed in Opera 9 but it still produces an ugly gap in my layout in
Opera 8. I know it's a small proportion of the market but I am a pedant.

The "fix" listed at the page above doesn't work for me, it's not really a
fix and it creates its own issues.

Does anyone know how to either:

Serve CSS to just Opera < 9 *without* browser sniffing as I don't consider
it reliable enough, something like the * html hack but for Opera rather than
IE

or:

Work around this bug?

Proviso: I haven't checked if this can be classified as an Opera bug or
not.

The test case needlessly abuses floats, there is no need to float the
list items, there may also be a way to avoid floating the list. Remove
the floats on the list item, replace that with text-align and the
'problem' goes away. The list is floated to get it to shrink wrap around
the list items, that should definitely be ditched if the shrink wrapping
isn't required, and other options should be looked at if it is.
 
N

Nik Coughlin

Spartanicus said:
Proviso: I haven't checked if this can be classified as an Opera bug
or not.

Hi Spartanicus,

The test case needlessly abuses floats, there is no need to float the
list items, there may also be a way to avoid floating the list. Remove
the floats on the list item, replace that with text-align and the
'problem' goes away. The list is floated to get it to shrink wrap
around the list items, that should definitely be ditched if the
shrink wrapping isn't required, and other options should be looked at
if it is.

I don't know about the test case (I didn't really look at the code) but my
page needs the floats (I believe so anyhow, I could be wrong) for a number
of reasons:

http://www.nrkn.com/ia/

I think I'm just going to let it slide, it works perfectly in Firefox 1.07+,
Konqueror, Camino, Opera <8, Opera 9, Safari 1.2+, IE5+.
 
N

Neredbojias

Right, looks like I have to post an url then:

http://nrkn.com/ia/

You'll note that #navigation li has margin-top: 4px;

In Opera, nothing else, just Opera, the #navigation li also has a 4px
bottom margin - it echoes the margin-top (hence Opera mirror margins
bug).

Removing margin-top: 4px removes the bottom margin as well. Setting
the bottom margin to 0 has no effect.

It seems that removing the float on _either_ the ul or li "solves" the
problem, but I can see your purpose for these. If you could find another
way to get a background... Re. your reply to Spart, if it only occurs in
Opera 8, "bug" might be right.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top