Table 100% and horizontal scrollbar, why?

I

Iaz

If you create a table width=100%, the horizontal scrollbar will appear
under IE8.

Example:

<html>
<body>
<table width=100%><tr><td></td></tr></table>
</body>
</html>

Is it normal? Why? And how to avoid it?

I could use 99% instead 100% but I don't like the workaround very much.
 
D

Doug Miller

If you create a table width=100%, the horizontal scrollbar will appear
under IE8.

Example:

<html>
<body>
<table width=100%><tr><td></td></tr></table>
</body>
</html>

Is it normal? Why?

Doesn't happen in Firefox, Safari, or Opera. So I'd say, no, it's not normal.
And how to avoid it?

Use a standards-compliant browser?
 
C

C A Upsdell

Iaz said:
If you create a table width=100%, the horizontal scrollbar will appear
under IE8.

Example:

<html>
<body>
<table width=100%><tr><td></td></tr></table>
</body>
</html>

Is it normal? Why? And how to avoid it?

I could use 99% instead 100% but I don't like the workaround very much.

For many, many years IE has had problems with 100% table widths. I
usually set the widths to 98% to avoid the problems. Even if you find a
fix for IE8, there are a lot of older version of IE which will likely
remain troublesome.
 
N

Neredbojias

If you create a table width=100%, the horizontal scrollbar will
appear under IE8.

Example:

<html>
<body>
<table width=100%><tr><td></td></tr></table>
</body>
</html>

Is it normal? Why? And how to avoid it?

I could use 99% instead 100% but I don't like the workaround very
much.

Try using a strict doctype, style border:0; and width:100%; on the
table (-instead of width=100%), and make sure markup is all valid.
 
A

Ali

If you place:

overflow: hidden

in the body tag of your CSS it will fix the problem.

..body{
overflow: hidden
}
 
D

dorayme

Ali said:
If you place:

overflow: hidden

in the body tag of your CSS it will fix the problem.

.body{
overflow: hidden
}

And how does the user then see the rest of the table when it is wide and
the user has a less wide screen/browser?
 
D

dorayme

Travis Newbury said:
Buy a bigger browser DUH...

I know a bloke who bought a car that would not fit into his garage. he
loved the car more than the house so he moved to one with a bigger
garage.
 
N

Neredbojias

I know a bloke who bought a car that would not fit into his garage.
he loved the car more than the house so he moved to one with a bigger
garage.

I had the same problem with a particular body part and my ex-wife.
 
Joined
Jul 17, 2009
Messages
3
Reaction score
0
Iaz said:
If you create a table width=100%, the horizontal scrollbar will appear
under IE8.

Example:

<html>
<body>
<table width=100%><tr><td></td></tr></table>
</body>
</html>

Is it normal? Why? And how to avoid it?

I could use 99% instead 100% but I don't like the workaround very much.

did you try to use pure CSS instead of the Table ? Does it work in the Other web browsers ?
 

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

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top