Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / CSS / March 2007



Tip: Looking for answers? Try searching our database.

Internet Explorer and overflow: hidden with images

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Christopher Night - 29 Mar 2007 00:04 GMT
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 - 29 Mar 2007 00:54 GMT
> 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

Signature

Berg

Christopher Night - 29 Mar 2007 01:03 GMT
>> http://www.people.fas.harvard.edu/~night/crossroads/
>>
[quoted text clipped - 4 lines]
> 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 - 29 Mar 2007 03:02 GMT
>>> http://www.people.fas.harvard.edu/~night/crossroads/
>>>
[quoted text clipped - 5 lines]
>
> 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).

Signature

Berg

Christopher Night - 29 Mar 2007 03:45 GMT
>>>> http://www.people.fas.harvard.edu/~night/crossroads/
>>>>
[quoted text clipped - 10 lines]
>
> 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 - 29 Mar 2007 18:20 GMT
>>>>> http://www.people.fas.harvard.edu/~night/crossroads/
>>>>>
[quoted text clipped - 4 lines]
>
> Oh that's good news! What OS are you running it on?

Win 2K Pro

Signature

Berg

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.