Connecting Tech Pros Worldwide Forums | Help | Site Map

Horizontal scroll not working when window size is reduced

Newbie
 
Join Date: Jul 2008
Posts: 2
#1: Jul 31 '08
Hi All,
In my html page in which i have used <div>'s horizontal scroll is not coming when window size is reduced.
And its taking all divisions starting from left as i justified them. but if i specify it to be right justified also then also scroll is not appearing :(

Plz HElp.
Thanks in Advance
Regards
Abhinav Mehta

Member
 
Join Date: Jun 2007
Posts: 101
#2: Jul 31 '08

re: Horizontal scroll not working when window size is reduced


Quote:

Originally Posted by abhi86

Hi All,
In my html page in which i have used <div>'s horizontal scroll is not coming when window size is reduced.

Are the divs getting smaller as the window gets smaller?

Try adding the following. You see the horizantal scroll when the window is smaller than 700px wide. If you don't apply width to the div then they will automatically try to fit inside the window.

Expand|Select|Wrap|Line Numbers
  1. body {
  2.   width: 700px
  3. }
  4.  
You can also use "min-width" which lets the divs "flow" to the edges for large screens but forces horizantal scroll bars for very small screens.
Newbie
 
Join Date: Jul 2008
Posts: 2
#3: Aug 4 '08

re: Horizontal scroll not working when window size is reduced


Hi,
Thanks a lot. its working fine now. :)

Regards
Abhinav Mehta

Quote:

Originally Posted by henryrhenryr

Are the divs getting smaller as the window gets smaller?

Try adding the following. You see the horizantal scroll when the window is smaller than 700px wide. If you don't apply width to the div then they will automatically try to fit inside the window.

Expand|Select|Wrap|Line Numbers
  1. body {
  2.   width: 700px
  3. }
  4.  
You can also use "min-width" which lets the divs "flow" to the edges for large screens but forces horizantal scroll bars for very small screens.

Reply