Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Table 100% and horizontal scrollbar, why?

1 view
Skip to first unread message

Iaz

unread,
Jul 14, 2009, 7:39:48 AM7/14/09
to
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.

teebo

unread,
Jul 21, 2009, 9:20:27 PM7/21/09
to
> If you create a table width=100%, the horizontal scrollbar will appear
> under IE8.
> <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.

First, you shouldn't really write width=100% in the <table> tag,
move all your styling to a style sheet file (or a <style>-section
in the head of you html-file if you are unable to have css-files)
Secondly, with a good web browser there shouldn't be any need
to force a table to 100%, the table should be as wide as needed
for its content automaticly anyway. I assume you want to make a
real table, not make some tablebased design (everyone have
finally stopped designing webpages with html table tags by now,
it just took them 10 years..)

Anyway, it was just an simplified example, right?
But you have probably stumbled on one of InternetExplorers bugs...
are we surprised? No..... ;-D there are many more. Hopefully
MS will fix that one in next version of MSIE8. otherwise, there will
be a version MSIE9 sometime soon, it only took five years to release
ver 7 after ver 6, after all :-)

When it comes to work-arounds... if you are not forced by someone
who pays your salary or breaks your leg or something, just ignore how
things looks in MSIE as long as the text is readable ok?
You don't care about how your page looks in NCSA Mosaic either, right?
If the user insist on using a buggy browser - she deserves to see
the bugs. You *should* test that your page is *usable* in all
common browsers though - as long as it just looks a little strange
it is okay.
Things like forcing <!doctype -stuff etc to make browser stop
render style in MSIE5.5-mode and special MSIE-stylesheets etc
should really be banned by now in my opinion.

0 new messages