XHTML & IE6 overflow:hidden problem - xhtml

How can I get this CSS declaration to work in IE6 please?
#mask{width:725px;height:495px;margin:0;border:0;padding:0;overflow:hidden;}
The problem is the content which is much larger than 725px and exactly 495px (much like a horizontal scrolling thingy) does not get hidden in IE6.
Edit:
1. The background images of the hidden divs shows.
2. I am also using Twin-Helix PNG Fix 2.0 Alpha.
Thank you.

This will be happening because you have relatively positioned elements inside your #mask container.
This is due to a bug where relatively positioned children are not correctly clipped and hidden for a parent element with overflow: hidden applied in Internet Explorer 6 and 7. The same problem also exists for overflow: auto and undoubtedly overflow: scroll as well.
It can be fixed by also applying position: relative to the element you are setting the overflow on.

Related

Why does IE not display position:absolute like it's supposed to?

Internet Explorer 9 is not properly displaying an absolutely positioned element. The parent is relative, so the absolute element should be "absolute" relative to the parent div. However, it is acting much closer to "fixed" behavior. When I try to trigger hasLayout on the involved elements, it shows everything inline.
The element in question is the .programs-list div that appears when you click on a region and then a country.
This happens in all versions of IE.
Thank you very much in advance.
After analyzing your HTML structure, you need to set your div#main-wrapper with a position:relative in order to keep the popup over the map area.
CSS
#main-wrapper {
position: relative;
}

z-index in IE7 not rendering properly

I am struggling to make a webpage backwards-compatible with IE7 (I know, 'IE7?!', but that's what is on our school computers). I am trying to show a div the full size of the page to darken the body and show two specific divs on top of that. However, when I view the page, the dark div appears over all other elements on the page - even those with a higher z-index.
You can see the page here and view it in IE7 using netrender.
I have applied positioning to all of the elements and it seems to have done nothing. Maybe it is just my eyes?
I think if you pulled the modal box div out of the #wrapper div, it might work. It appears older versions of IE compare sibling z-index values, so the #blackBg div is comparing itself to the #wrapper div, which has its z-index set to auto. If the modal box was a sibling to both and had its z-index higher, it just might solve the issue.
As far as I am concerned, it is not possible so I gave up in the end.

Negative absolute positioning in IE7 with an image

I have a website with an image that is absolutely positioned in the header. It looks like it's working everywhere but IE6/7. My image is positioned absolutely within a header that has relative positioning. The image continues to push down the height of the header.
/*div*/
#header{padding:0;overflow:visible;position:relative;min-height:140px;margin:0;}
/*image*/
#bod{position:absolute;top:0px;left:-95px;}
I tried to change to a fixed height but that screwed up the cart item on the right hand side.
The website is greatcaesars.com.
If anyone has a suggestion on what I might do to fix this, I'd appreciate it.
In older versions of IE, height is treated a lot like min-height, and min-height doesn't work at all.
Try this:
#header{padding:0;overflow:visible;position:relative;min-height:140px;margin:0;}
#header{height: 140px;}
html > body #header{height: auto;}
The use of > to indicate immediate children, isn't recognised by older versions of IE.

CSS element consuming entire width in IE7

I have an IE7 CSS issue. I have setup a demo in jsfiddle, but basically I have a tabbed menu setup with rounded corners on the tabs (no rounded corners shown in jsfiddle). The rounded corners are floated left and right.
Everything works great in FF and Chrome, but in IE7 the floated elements are causing the tabs to consume the entire width. I have tried numerous things, overflow: hidden, position, display, etc... but I just can't work it out!
Any help appreciated.
http://jsfiddle.net/EszSr/1/
I would just set the corner elements to display: absolute; and the containers to position: relative if needed. That should work.
Simple demo on jsFiddle: http://jsfiddle.net/ZSpjk/1/
Something that I'd try (don't have access to IE7 atm.) is, to give the tabs a width (only for IE, e.g. through a conditional comment). It could be a smaller width than you actually need, IE will "widen" it as needed for the content.

IE8 - CSS overflow hidden, fix causes further problems with jquery

Problem part 1: Basically I have the age-old IE problem of overflow: hidden; not working in IE. The fix (which does work, admittedly) is to also add "position: relative;" to the element/parent; however this causes a problem for me. Firstly I want to know if there's another way without appending position relative.
If this is the only solution though, I'll outline the problem it causes:
Problem part 1b: I'm using jquery 1.4.2 and jquery ui 1.8.4. The concept is basically for the user to pick up a card (draggable li item) from the pile (ul surrounded by div) and place it into the appropriate category (initially empty ul items). Because positioning each card on top one another in the pile with css with position: absolute; would cause problems with the interaction, I've let them all display one after eachother in a column and used a div of set height and width with overflow: hidden to obscure the rest of the cards instead. Works great in FF, but in IE doesn't work due to the overflow: hidden bug. If I put in position: relative, for both browsers the z-index of the card when it is dragged appears to be behind everything outside of its parent div. I've tried changing the z-index on every element on the page to specify the order, but this appears to be disregarded entirely. I'm really hoping not to have to get into the jquery to make changes. Any solutions?
Attached are pics which make this wall of text a little clearer. Picture 1 is how it should work and does in FF without position relative. Picture 2 is when position relative is added to the mix. Both pictures show a card being dragged to a position in a new column.
Picture 1: http://plldd.net.au/storage/overflowhidden.jpg
Picture 2 is at the same location and is called positionrelative.jpg
Thanks for any help you can offer.
can you try wrapping it all in another div with position relative? This div surrounding everything instead of the immediate parent.

Resources