By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,625 Members | 2,235 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,625 IT Pros & Developers. It's quick & easy.

hiding vorizontal scrollbar in div layer

P: n/a
I have a div layer that will contain a variable list of information.
When it overflows i want it to scroll but only vertically.

This is the layers definition so far...

#remoteScreen
{
z-index: 4;
position: absolute;
left: 14;
top: 46;
width: 171;
height: 153;
background-color: Black;
overflow: scroll;
}

it shows the scroll bars but in both directions... as i dont want it to
ever scroll horizontally i dont want to waste the space.

Is there any way of only showing the vertical scroll bar???

If its of any help this will only ever be run in IE so if its an evil IE
trick i dont mind hearing it ;)

Thanks alot

Mike

Jul 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Michael Ditum wrote:
This is the layers definition so far...

#remoteScreen
{
z-index: 4;
position: absolute;
left: 14;
top: 46;
width: 171;
height: 153;
background-color: Black;
overflow: scroll;
}

it shows the scroll bars but in both directions... as i dont want it to
ever scroll horizontally i dont want to waste the space.
That is because you used overflow:scroll;
Is there any way of only showing the vertical scroll bar???
If the content fits horizontally: overflow:auto; will do the job.
If its of any help this will only ever be run in IE so if its an evil IE
trick i dont mind hearing it ;)
It is perfectly standard compliant. You could have looked in the
specifications.
Thanks alot
np
Mike

--
Anne van Kesteren
<http://www.annevankesteren.nl/>
Jul 20 '05 #2

P: n/a
Michael Ditum wrote:
#remoteScreen
{
z-index: 4;
position: absolute;
left: 14;
top: 46;
width: 171;
height: 153;
background-color: Black;
overflow: scroll;
}


Btw, your left, top, width and height values must have a unit. There is
no default unit in CSS.
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)

Jul 20 '05 #3

P: n/a
Quoth the raven named Johannes Koch:
Michael Ditum wrote:
#remoteScreen
{
z-index: 4;
position: absolute;
left: 14;
top: 46;
width: 171;
height: 153;
background-color: Black;
overflow: scroll;
}

Btw, your left, top, width and height values must have a unit. There is
no default unit in CSS.


...and this will be invisible in my browser where the default text
color is black. Black on black is very hard to read.

Hint: when assigning a color /or/ a background-color, always specify
both. { color: white }

Assign your left and top with either px or em, but assign the width
and height with em, so the div can grow as font size is increased.

--
-bts
-This space intentionally left blank.

Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.