[thelist] CSS: div width: 100%

Mark Howells mark at mountain.ch
Fri Mar 8 06:43:00 CST 2002


> I've been messing around with using stylesheets to create liquid content on
> my site, and I've hit a strange little problem.  Altho' it's probably
> non-standard, I set a div width:80% and it does change the size of the div
> as I resize my browser window.  However, for some reason, I get a scrollbar
> at the bottom (IE5 Mac), the more narrow the window, the larger the area to
> scroll, altho' there is nothing 'over there' to look at.

This is a /very/ common feature of CSS layouts in IE / Mac. As far as I
know, there's no remedy.

My own opinion is that it's in the same league as trying to find solutions
to minor presentational glitches in NN4--if the page displays well, then
minor things like this aren't worth worrying about, unless they seriously
compromise the functionality of the site. The horizontal scroll bar can be
eliminated in IE5 / Mac by ensuring that the total content width is less
than 100% and it only returns when the window is resized. Not /that/ many
regular users are going to keep resizing their window on the same page, and
the scrollbars get reset on reload / going to a new page.

> I was kinda hoping that I could use this instead of <table width=80%> but
> with a horizontal scrollbar, it just looks stoopid.

Just because it's IE5 / Mac--one of the better CSS browsers--doesn't mean
that there aren't any CSS issues! You'll have to weigh up the importance of
finding a workaround for this minor browser bug over the amount of work
you'd have to do to make the same site work in all browsers.

Scrollbar issue in IE5 / Mac, or accessibility / <table> issues in NN4, IE6,
NN6, Lynx etc...etc....? I know which I'd choose.

Regards
Mark Howells
<http://www.mark.ac/evl/>




More information about the thelist mailing list