100% Width Div Gets Cut Off When I Scroll Right If My Browser Window Is Smaller Than Div's Content
I had a problem on my own site with a
that is supposed to have 100% width. The code for it is shown below. #myDiv { width: 100%; height: 160px; background:
Solution 1:
Ok, solved it! I just have to set the min-width
property to the width of that <div>
's content.
Thanks anyways guys!
Solution 2:
How you tried this? Tested it in IE7:
html, body {
position:relative;
overflow:hidden;
margin:0 auto !important;
}
Solution 3:
I've tried width: auto;
and it's helped.
Solution 4:
I've solved this issue for myself with display: inline-block
. Here is example: http://jsfiddle.net/z01g0r2d/1/ . Note if you try to set width of the long content as, for example, 200%
the solution stops working.
Post a Comment for "100% Width Div Gets Cut Off When I Scroll Right If My Browser Window Is Smaller Than Div's Content"