This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Stylesheets > March 2007 > Internet Explorer and overflow: hidden with images





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Internet Explorer and overflow: hidden with images
Christopher Night

2007-03-28, 11:17 pm

I'm making a Javascript program that uses overflow:hidden on a containing
div to crop an image. This page (temporarily) shows an example of what I
mean:

http://www.people.fas.harvard.edu/~night/crossroads/

The relevant markup is:

<div style="overflow:hidden; width: 238px; height:47px;
border: thin yellow solid;">
<img src="hidden-overflow.png" alt="hidden overflow!"
style="width:294px; height: 47px;">
</div>

In a CSS2-compliant browser, you'd see part of the image; in IE (both 6
and 7) you see the whole thing. Strangely enough, though, it does properly
crop text. So I'm hoping there's some workaround, some hack or quirks-mode
setting to get it to work. Right now the best thing I've got for IE users
is an iframe, blah.

I searched this newsgroup, and I found a couple of mentions of this
problem, but no solution. I hope I'm not being tiresome.

Thanks,
Christopher

PS: Sorry that I'm using CSS in such a bizarre way with this program. I
really do believe in the CSS "philosophy" and I use it accordingly in my
actual web documents! This is the exception.
Bergamot

2007-03-28, 11:17 pm

Christopher Night wrote:
>
> http://www.people.fas.harvard.edu/~night/crossroads/
>
> In a CSS2-compliant browser, you'd see part of the image; in IE (both 6
> and 7) you see the whole thing.


If you expect browsers to behave in a compliant manner, you shouldn't
trigger quirks mode.
http://www.hut.fi/u/hsivonen/doctype.html

--
Berg
Christopher Night

2007-03-28, 11:18 pm

On Wed, 28 Mar 2007, Bergamot wrote:
> Christopher Night wrote:
>
> If you expect browsers to behave in a compliant manner, you shouldn't
> trigger quirks mode.
> http://www.hut.fi/u/hsivonen/doctype.html


Well when did I ever trigger quirks mode? I use the 4.01 Strict doctype.

Thanks,
Christopher
Bergamot

2007-03-28, 11:18 pm

Christopher Night wrote:
> On Wed, 28 Mar 2007, Bergamot wrote:
>
> Well when did I ever trigger quirks mode? I use the 4.01 Strict doctype.


Oops, I saw the URL was missing and assumed it was Transitional. My bad.

BTW, my IE6 shows the overflow is handled correctly ('NOT' is hidden).

--
Berg
Christopher Night

2007-03-28, 11:18 pm

On Wed, 28 Mar 2007, Bergamot wrote:
> Christopher Night wrote:
>
> Oops, I saw the URL was missing and assumed it was Transitional. My bad.
>
> BTW, my IE6 shows the overflow is handled correctly ('NOT' is hidden).


Oh that's good news! What OS are you running it on?

-Christopher
Bergamot

2007-03-29, 7:19 pm

Christopher Night wrote:
> On Wed, 28 Mar 2007, Bergamot wrote:
>
> Oh that's good news! What OS are you running it on?


Win 2K Pro

--
Berg
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews