Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

css - overflow allow horizontal scroll

Tags:

css

overflow

Quick question about overflows. I'm working on this page

http://www4.wittenberg.edu/admission_dev/undergrad/ and I'm trying to get the overflow to allow for horizontal scrolls. I've tried setting the body to hidden and the class "real body" to auto. This doesn't seem to work. Any help would be appreciated!

Ben

like image 665
Ben McCombs Avatar asked Dec 09 '11 15:12

Ben McCombs


1 Answers

you need to wrap your long content div with a position: relative; overflow: auto div.

which i something like this:

.wrapper {
  position: relative;
  overflow: auto;
}

.content {
  position: absolute;
  width: 30000px;
}

for a better example, please check http://jsfiddle.net/wXqPv/

like image 80
Ya Zhuang Avatar answered Oct 12 '22 22:10

Ya Zhuang