Horizontal scroll not working when window size is reduced

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • abhi86
    New Member
    • Jul 2008
    • 2

    Horizontal scroll not working when window size is reduced

    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
  • henryrhenryr
    New Member
    • Jun 2007
    • 103

    #2
    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.

    Code:
    body {
      width: 700px
    }
    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.

    Comment

    • abhi86
      New Member
      • Jul 2008
      • 2

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

      Regards
      Abhinav Mehta

      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.

      Code:
      body {
        width: 700px
      }
      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.

      Comment

      Working...