HighDots Forums  

overflow showing both scrollbars when I only want the veritcal

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss overflow showing both scrollbars when I only want the veritcal in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Laphan
 
Posts: n/a

Default overflow showing both scrollbars when I only want the veritcal - 04-06-2008 , 10:50 AM






Hi All

I'm really stumped with this one.

I'm using the overflow command so that a designated area of my web page will
show a lot of vertical content rather than my entire page being vertically
long.

It all works fine apart from the fact that the horizontal scrollbar shows
even though the content doesn't overflow to the right.

An example of my code is as follows:

==== PAGE CODE ====

<DIV CLASS="SearchResults">

<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0>
<TR><TD COLSPAN=2 CLASS='ResultsTitle'>2 Ruddy Road</TD></TR>
<TR>
<TD CLASS='ResultsImage'><IMG SRC='user-data/9/s649gh-2-house.jpg' WIDTH=120
HEIGHT=90 BORDER=0></TD>
<TD CLASS='ResultsDetailContainer'>

<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 CLASS='ResultsDetails'>
<TR><TD>Status: OK</TD></TR>
<TR><TD>Price: &pound;875 per month</TD></TR>
<TR><TD>Style: Detached</TD></TR>
<TR><TD>Location: Swinton</TD></TR>
</TABLE>

</TD></TR>
<TR><TD COLSPAN=2 CLASS='ResultsBtn'><IMG SRC='images/btn-details.jpg'
BORDER=0></TD></TR>
<TR><TD COLSPAN=2 CLASS='ResultsDivider'></TD></TR>
</TABLE><BR>


<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0>
<TR><TD COLSPAN=2 CLASS='ResultsTitle'>32 Dingly Dell, Smithfields</TD></TR>
<TR>
<TD CLASS='ResultsImage'><IMG SRC='user-data/10/s735bs-32-house.jpg'
WIDTH=120 HEIGHT=90 BORDER=0></TD>
<TD CLASS='ResultsDetailContainer'>

<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 CLASS='ResultsDetails'>
<TR><TD>Status: OK</TD></TR>
<TR><TD>Price: &pound;650 per month</TD></TR>
<TR><TD>Style: Detached</TD></TR>
<TR><TD>Location: Wombwell</TD></TR>
</TABLE>

</TD></TR>
<TR><TD COLSPAN=2 CLASS='ResultsBtn'><IMG SRC='images/btn-details.jpg'
BORDER=0></TD></TR>
<TR><TD COLSPAN=2 CLASS='ResultsDivider'></TD></TR>
</TABLE><BR>

</DIV>

==== PAGE CODE ====

==== CSS CODE ====

..SearchResults
{
margin:0px;
padding:0px;
width:440px;
height:400px;
overflow:auto;
}

==== CSS CODE ====

As you can see a DIV container with a width of 440px contains my results
code and on-screen the result code (I turned on border=1 to see the width of
the tables) doesn't come anywhere near the max width of the DIV, ie it
doesn't need more than the 440px, yet the horizontal scrollbar still kicks
in as if you need to scroll to the right.

Do I have to do anything just to get the vertical scrollbar displayed?

Thanks

Laphan



Reply With Quote
  #2  
Old   
Michael Fesser
 
Posts: n/a

Default Re: overflow showing both scrollbars when I only want the veritcal - 04-06-2008 , 11:20 AM






..oO(Laphan)

Quote:
I'm really stumped with this one.

I'm using the overflow command
Property, not command.

Quote:
so that a designated area of my web page will
show a lot of vertical content rather than my entire page being vertically
long.
Why not let the page just flow and scroll vertically? That's how
billions of websites work, because it's the most userfriendly way.

Of course a real URL would help to see what you're trying to achieve
actually, because in some cases such a scrolling box can be a useful
tool. But unfortunately it's used improperly way too often.

Quote:
It all works fine apart from the fact that the horizontal scrollbar shows
even though the content doesn't overflow to the right.
With the 'overflow' property most if not all browsers will show both
scrollbars, even if not needed. There are also the 'overflow-x' and
'overflow-y' properties, which are part of CSS 3, but should already
work in most browsers (Opera as of 9.5, FF and IE are fine).

Micha


Reply With Quote
  #3  
Old   
Laphan
 
Posts: n/a

Default Re: overflow showing both scrollbars when I only want the veritcal - 04-06-2008 , 07:01 PM



Many thanks guys


"Michael Fesser" <netizen (AT) gmx (DOT) de> wrote

..oO(Laphan)

Quote:
I'm really stumped with this one.

I'm using the overflow command
Property, not command.

Quote:
so that a designated area of my web page will
show a lot of vertical content rather than my entire page being vertically
long.
Why not let the page just flow and scroll vertically? That's how
billions of websites work, because it's the most userfriendly way.

Of course a real URL would help to see what you're trying to achieve
actually, because in some cases such a scrolling box can be a useful
tool. But unfortunately it's used improperly way too often.

Quote:
It all works fine apart from the fact that the horizontal scrollbar shows
even though the content doesn't overflow to the right.
With the 'overflow' property most if not all browsers will show both
scrollbars, even if not needed. There are also the 'overflow-x' and
'overflow-y' properties, which are part of CSS 3, but should already
work in most browsers (Opera as of 9.5, FF and IE are fine).

Micha




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.