Posts: 878
Name: Matt Pealing
Location: England, north west
|
On the following website:
http://tinyurl.com/cyuvh65
I have an absolutely positioned element with a negative right margin so that it extends out of the side of the containing elements:
Code:
#banner-disc {
background: url('../image/banner-disc.gif');
width: 846px;
height: 270px;
position: absolute;
right: 0;
top: 0;
clear: both;
z-index: 0;
margin-right: -100px;
}
I've attached a screenshot showing the element in question.
It's creating two problems, one being if I resize my browser to 1024 pixels wide a horizontal scrollbar appears. I didn't expect this seeing as the element is absolutely positioned?
Secondly, I cannot add overflow:hidden to my #wrapper element in order for the 50px of bottom padding on the body element to work. If I do this, the side of #banner-disc is chopped off.
Is the only way I can clear it is to add a br.clear style before the closing tag for #wrapper?
|