a firefox scrollbar bug

M

meltedown

here is the problem broken down to a simple example:
http://reenie.org/test/test26.php

There is a blue table you must scroll down to.

The table has cellspacing of 1 with a div for a background to make
single pixel cell borders. As you can see, the right hand of the table
has a 2 pixel border in firefox.

The thick border only shows up when there is a scroll bar.

Is there any way around this ?
 
T

Thomas Jollans

meltedown said:
here is the problem broken down to a simple example:
http://reenie.org/test/test26.php

There is a blue table you must scroll down to.

The table has cellspacing of 1 with a div for a background to make
single pixel cell borders. As you can see, the right hand of the table
has a 2 pixel border in firefox.

The thick border only shows up when there is a scroll bar.
actually, it only shows up for certain window sizes. These are so few that
the glitch could be avoided.
Is there any way around this ?

/* untested
skip the div, make the table class='blu' */
table.blu { width:50%; margin:auto; border-top:1px solid blue;
border-right:1px solid blue }
table.blu td { border-bottom:1px solid blue;
border-left:1px solid blue }
 
M

Martin Jay

meltedown said:
here is the problem broken down to a simple example:
http://reenie.org/test/test26.php

There is a blue table you must scroll down to.

The table has cellspacing of 1 with a div for a background to make
single pixel cell borders. As you can see, the right hand of the table
has a 2 pixel border in firefox.

The thick border only shows up when there is a scroll bar.

Is there any way around this ?

I was about to say what 2 pixel border on the right, but then I re-sized
Firefox's window and saw your problem.

Maybe give the table 50% width and use the style "border-collapse:
collapse," then give the td the 1px blue border you want. Something
like this:

<style type='text/css'>
td{background:white; border: 1px blue solid;}
table{width: 50%; margin: auto; border-collapse: collapse;}
</style>

I've uploaded the full page to
<http://www.spam-free.org.uk/pages/table.html>.
 
J

Jim Moe

meltedown said:
here is the problem broken down to a simple example:
http://reenie.org/test/test26.php

There is a blue table you must scroll down to.
There is no blue table. There is no scroll bar.
The table has cellspacing of 1 with a div for a background to make
single pixel cell borders. As you can see, the right hand of the table
has a 2 pixel border in firefox.

The thick border only shows up when there is a scroll bar.

Is there any way around this ?

Not really. This is a bizarre little defect in FF (the gecko engine), an
off-by-one error caused, no doubt, by rounding to integer values. As the
viewport width is changed, that border changes size as well.
Your method to get such a border is rather unusual. Most people would
use the "border" property to define a border:
table {
border-collapse: collapse;
border-top: 1px solid blue;
border-right: 1px solid blue;
}
td {
background:white;
border-left: 1px solid blue;
border-bottom: 1px solid blue;
}
 
M

meltedown

Martin said:
I was about to say what 2 pixel border on the right, but then I re-sized
Firefox's window and saw your problem.

Maybe give the table 50% width and use the style "border-collapse:
collapse," then give the td the 1px blue border you want. Something
like this:

<style type='text/css'>
td{background:white; border: 1px blue solid;}
table{width: 50%; margin: auto; border-collapse: collapse;}
</style>

I've uploaded the full page to
<http://www.spam-free.org.uk/pages/table.html>.

Looks good, thanks for the tip.
 

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,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top