469,352 Members | 2,140 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,352 developers. It's quick & easy.

hiding vorizontal scrollbar in div layer

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
3 11977
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
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
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.

Similar topics

8 posts views Thread by Fabian | last post: by
1 post views Thread by Jaz | last post: by
1 post views Thread by Jason & Juli Cook | last post: by
reply views Thread by Chukkalove | last post: by
9 posts views Thread by dd | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.