When overflow: hidden Doesn’t Hide in IE
I’ve come across this problem before, where I want to hide the overflow of an element, this works fine in all browsers except IE - however it’s never been a problem in anything that I’ve progressed far enough with to worry about fixing it for IE.
Well this evening I came across the problem again, and found the solution - IE (I’m just looking at 6 here - not sure if 7 does the same) doesn’t like it when you have a position: relative; on the child (or possibly children) of an element which you have declared overflow: hidden;.
So in my case swapping that out for position: absolute; on the child and overflow: hidden; position: relative; on the parent worked a charm. Now IE 6 plays nicely like its other browser friends.
Comments
There have been 22 comments so far, join the discussion.
Pages: [2] 1 » Show All
22. Usman - 4th Sep 2008 - 4:29 pm
Been searchin Google for a fix, and finally found it. Thanks much.
21. Pavel - 3rd Jul 2008 - 1:06 pm
I know i won’t be first and last neither who say that, but it really works. Thanks a lot
Leave a comment
No HTML please, only textile. For code please use [lang]...[/lang] tags (e.g. [html]...[/html] for HTML)