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:

facebook's 100% width bug

stackoverflow's bug:

stackoverflow's 100% width bug

ok, solved it! have set min-width property width of <div>'s content.

thanks anyways guys!


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -