0

Vertical or Horizontal Only Scroll Bars

CSS

Hey Everyone,
Had a client that needed tabular data to scroll to the right without messing up the layout of the screen. This is what I found

.hortScroll{overflow-x:auto; overflow-y:none; width:400px; height:400px;} .vertScroll{overflow-x:none; overflow-y:auto; width:400px; height:400px;}

Display only horizonal scroll bar
<div class="hortScroll">...</div>

Display only vertical scroll bar
<div class="vertScroll">...</div>

 

Note: overflow-y and overflow-x are not compatiable with FireFox as I understand it. This isn't a big issue for me as my company has IE6 as it's current standard. But I suppose it will break in a few months when we adapt to IE7. Thoughts or opinons?

Good Day!
Ryan

tags:
CSS
cj said:
 
which version of firefox and which doctype are you using? i'm on firefox 2.0 using xhtml transitional and overflow-x is working fine for me. the following gives me only a horizontal scrollbar in firefox and ie. note that opera doesn't play nice, though.

.overflow {
   width: 100%;
   overflow-x: scroll;
   }
 
posted 1088 days ago
Add Comment Reply to: this comment OR this thread
 

Search