By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,986 Members | 1,487 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,986 IT Pros & Developers. It's quick & easy.

Best min-width, max-width hack for IE6 ?

P: n/a
What is the best way to write a page that uses min-width and max-width
and will work IE6, IE7 and other modern browsers? [my tiny base of
clients are all corporate microserfs so I must get the IE pages right
- it doesn't actually matter about other browsers.]

I realise that I need a hack for IE6 but not for IE7 so what is the
best IE6 hack that IE7 will ignore? Should I load different style
sheets based up the browser (like this)

<!--[if lte IE 6]>
<link rel="stylesheet" href="IE6-style.css" type="text/css" />
<![endif]-->

if so then where's there a good reference for that <!--[if lte IE 6]>
syntax and which browsers support it?

Am I right in thinking that I only need to apply min-width / max-width
to my outer page element and that I can then use (mainly) percentage
width measurements for all inner elements? I say 'mainly' because I'm
still inclined to use absolute measurements for small things like
borders, padding and margins.

Apart from width, elements are positioned relatively and absolutely on
these pages and I am required to rewrite them to accomondate a degree
of scaling between 1000 to about 1400 px (the precise max-width has
not yet been decided upon). The pages are currently written for an
absolute width of 1024 px.

Mar 19 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Mar 19, 10:41 am, "mark4asp" <mark4...@gmail.comwrote:
What is the best way to write a page that uses min-width and max-width
and will work IE6, IE7 and other modern browsers? [my tiny base of
clients are all corporate microserfs so I must get the IE pages right
- it doesn't actually matter about other browsers.]

I realise that I need a hack for IE6 but not for IE7 so what is the
best IE6 hack that IE7 will ignore? Should I load different style
sheets based up the browser (like this)

<!--[if lte IE 6]>
<link rel="stylesheet" href="IE6-style.css" type="text/css" />
<![endif]-->
*try* this style-

someElement {width:expression(this.offsetWidth>200?200:'');}

where 200 is your maxWidth

Mar 19 '07 #2

P: n/a
Scripsit mark4asp:
Apart from width, elements are positioned relatively and absolutely on
these pages and I am required to rewrite them to accomondate a degree
of scaling between 1000 to about 1400 px (the precise max-width has
not yet been decided upon). The pages are currently written for an
absolute width of 1024 px.
When you'll have to make major changes anyway, why don't you consider the
same approach as in HTML authoring for the WWW? You can learn a lot about it
in this group, especially if you just ignore the noise and the questions
that really relate to intranets and to techniques that are guaranteed to
fail on the WWW (and also on intranets more often than people think).

On the WWW, the canvas width varies from zero pixels to infinity.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Mar 19 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.