CSS - How to prevent the browser from showing scrollbars when a div goes outside of the window?

Posted by xarfai on Stack Overflow See other posts from Stack Overflow or by xarfai
Published on 2010-04-14T11:56:16Z Indexed on 2010/04/14 12:03 UTC
Read the original article Hit count: 167

Filed under:
|
|

I have a centered wrapper with following CSS:

div.wrapper {
width: 1170px;
padding-left:30px;
margin-top: 80px;
margin-bottom:20px;
margin-left: auto;
margin-right: auto;
position:relative;  
background-color:black; }

inside i have a div with following css:

position:absolute;
top:-26px;
left:517px;
height:63px;
z-index:3;

inside of this div is an image which has 759px width, that makes the wrapper grow larger and makes the browser show a v-scrollbar on lower display resolutions. what i want is to make the image go outside the wrapper but prevent the browser from showing the scrollbar, so that the right side of the image is only shown if your browser window is large enough and the wrapper keeps its 1200px width. i can't make it a background image because it goes over some of the other content. something that is compatible with >= IE7 would be nice

© Stack Overflow or respective owner

Related posts about css

Related posts about html