PDA

View Full Version : How do I remove Scroll bar?



grahamy84
Sep 21st, 2009, 03:07 PM
Hi,

I'm wondering if someone can help me. There is an awful looking scrollbar appearing inside one of my columns when I view my site in IE. Can anyone please tell me how I go about removing it?

www.caffevinci.com/test_test.html

Also, I have an error in my code:

Line 256, Column 46: Attribute "allowTransparency" is not a valid attribute
…rame height="572" allowTransparency="true" frameborder="0" scrolling="no" sty

How do I fix this?

seco
Sep 21st, 2009, 03:11 PM
div class="container" overflow:auto will make it scroll. take it out

grahamy84
Sep 21st, 2009, 03:19 PM
div class="container" overflow:auto will make it scroll. take it out

Thanks seco...I have another issue now :-D Check the site in IE. How do I make sure the container flows in line with the size of the form in the right column?

SB65
Sep 21st, 2009, 03:59 PM
The overflow:auto on #container was clearing the floats and extending the background of #container to include the floated columns. This was working correctly and the site's now wrong in FF.

The fact that the scrollbar appeared suggested some other IE "feature". In this case I think it's a hasLayout issue with #content.

I'd suggest reinstating the overflow:auto on #container and adding height:1% to #content. The height:1% will apply hasLayout to #content and fix the issue.

grahamy84
Sep 21st, 2009, 04:42 PM
The overflow:auto on #container was clearing the floats and extending the background of #container to include the floated columns. This was working correctly and the site's now wrong in FF.

The fact that the scrollbar appeared suggested some other IE "feature". In this case I think it's a hasLayout issue with #content.

I'd suggest reinstating the overflow:auto on #container and adding height:1% to #content. The height:1% will apply hasLayout to #content and fix the issue.

Thanks mate. That worked like a charm.

Can you explain the thought process behind the 1% height change? I can't get my head around it.

SB65
Sep 21st, 2009, 05:01 PM
Yes, looks a bit odd doesn't it? IE7 and below employ a proprietary property called "hasLayout" (more here (http://www.satzansatz.de/cssd/onhavinglayout.html)) to determine how to render an html element. The value of "hasLayout" (which is a yes/no) is in turn determined by the other properties of an element. For example, any element which has a height or a width, or is floated, among others, automatically "hasLayout".

The presence of the scrollbars in IE indicates that something isn't behaving as it should within #container, and since it's OK in FF, there's a good chance that it's a hasLayout issue. I used the IE developers toolbar (http://www.microsoft.com/downloadS/details.aspx?familyid=E59C3964-672D-4511-BB3E-2D5E1DB91038) to look at the items within #container - and this allows you to see whether the hasLayout property is set or not.

It wasn't for #content. Adding height:1% sets it - and doesn't cause any other issue here. We could equally well have applied a width or floated the element.

grahamy84
Sep 21st, 2009, 05:17 PM
Thanks for the info SB65. Great help, as always!