HighDots Forums  

IE equivalent for max-width?

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss IE equivalent for max-width? in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Steve Kobes
 
Posts: n/a

Default IE equivalent for max-width? - 09-11-2004 , 11:40 PM






This does exactly what I want in Mozilla:

<div style='margin-left: auto; max-width:740px; margin-right:auto'>
<div style='margin-left: 120px; max-width:500px; text-align:justify'>
<div style='margin-left:-120px; float:left'>
<img src='graphic.png' width='105' height='105' />
</div>
<p>lots of text here</p>
</div>
</div>

By "exactly what I want" I mean:

- if window is large enough, a column of text 500px wide, centered,
with a graphic in the 120px left margin;

- if window is not large enough, the left margin will not shrink
(thus preventing graphic from being pushed out of sight), but the
right margin will shrink;

- as window shrinks further, the text column will begin to shrink
(but only after the right margin has reached zero).

However, max-width is not supported on IE. In fact, the graphic
disappears completely (not sure why). How can I achieve the same
effect on IE?

TIA,
Steve

Reply With Quote
  #2  
Old   
Stephen Poley
 
Posts: n/a

Default Re: IE equivalent for max-width? - 09-12-2004 , 10:25 AM






On 11 Sep 2004 21:40:54 -0700, stevenkobes (AT) hotmail (DOT) com (Steve Kobes)
wrote:

Quote:
By "exactly what I want" I mean:

- if window is large enough, a column of text 500px wide, centered,
with a graphic in the 120px left margin;
Don't want that. Size the text column(s) in ems.

Quote:
However, max-width is not supported on IE. In fact, the graphic
disappears completely (not sure why). How can I achieve the same
effect on IE?
There is a hack described at
http://www.svendtofte.com/code/max_width_in_ie/

Be aware though that getting it to work properly can be considerably
more work than this page suggests. For example you will need a media
print override. And the slightest extra variations in the layout may be
difficult to handle or even insoluble. Do hide it in a separate
iehack.css which is linked to in an IE conditional comment, to make sure
no other browsers (or the validator) fall over it.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.