css - 100% width div gets cut off when I scroll right if my browser window is smaller than div's content -
i had problem on own site <div>
supposed have 100% width. code shown below.
#mydiv { width: 100%; height: 160px; background: #f48; }
this works great except following issue:
when browser window smaller <div>
's content, , scroll right <div>
move left rest of page rather occupying 100% of width of page's scrollable area.
this issue has been bugging me few hours , realized many other sites have same issue. including facebook.com , stackoverflow.com take @ snapshots below.
facebook's bug:
stackoverflow's bug:
ok, solved it! have set min-width
property width of <div>
's content.
thanks anyways guys!
Comments
Post a Comment