Divs shift in IE7
The Divs holding the "In Stock" banners (absolutely positioned) on this page seem to shift to the right (the first box is missing a banner, and there is an extra banner off the page. Why is this?
RE: Divs shift in IE7
When setting an absolute position the left and top attributes of the element will be calculated by the browser if not set. Internet explorer 7 has always been a bit unpredictable with this task.
At the page you specified IE7 calculates the left attribute of the "feature-banner_150px"-div differently than the other browsers. The other calculate the position to the top left corner of its parent, which is expected. IE7 however takes into account the sibling-element "instock-product-frame", which has "float:left" set, and sets the left position of the "feature-banner_150px"-div to the right edge of its sibling plus the margins of both elements. This is why the "In stock" banners are out of position.
Try removing the "float: left" attribute of the "instock-product-frame"-div. This should not make any difference since it is the only element included in the layout logic within its parent and its parent has an explicit size set. However when doing this IE7 will again act differently from the other browsers by suddenly ignoring the margin-top property of the element, making it move a bit too high. Solve this by setting a relative position with top attribute set to the same as margin-top (7px in this case). This should be browser specific css since it will mess up layout in other browsers. Google "ie7 specific css" to find out how to do that, f.e. http://www.webdevout.net/css-hacks
Hope this helps
/*Remove float attribute*/
/*Should be IE7 specific*/
/* margin-left: 51px;*/
May this will resolve your problem.
Thank you, removing the float did resolve the issue in IE7. However, in other browsers the banners floated above the box rather then touching the top of the box. So frustrating.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread