/    Sign up×
Community /Pin to ProfileBookmark

min-width – IE

I know we’ve been over this, but can someone tell me what I’m doing wrong. I used the trick shown [URL=http://www.svendtofte.com/code/max_width_in_ie/]here[/URL] , but when you attempt to resize the browser smaller than the minimum defined it crashes IE for me. [URL=http://aacofa.com]Check it out[/URL] for yourself.

This is the style in question:

[CODE]
#container {

margin: 20px 11em 20px 20px;

background-color: #FFFFFF;

min-width: 575px;

width: expression(document.body.clientWidth < 575 ? “575px” : “auto” );

}
[/CODE]

Thanks for any help.

to post a comment
CSS

6 Comments(s)

Copy linkTweet thisAlerts:
@LJKJun 30.2004 — Hi -

I saw absolutely no layout problems with IE6, so I'm not sure which vers. you'd checked prior.

Since min-max height and width aren't very widely supported yet, (CSS2) it seems as if as long as your page is 'flexible design', should get close to what you need without them. (Although I've had success on Moz. and IE using those properties for overflow:scroll centered paragraphs.)

Looked good to me,

El
Copy linkTweet thisAlerts:
@FangJun 30.2004 — Yes IE crashes big time.

If you use the expression for max-width and reverse the condition to less than you get the min-width value.
Copy linkTweet thisAlerts:
@redijediauthorJul 01.2004 — Thanks for your feedback.

I'm using IE6. When you resize the browser to a smaller size it crashes.

I tried reversing the logic, but it still crashes. Thanks anyway.
Copy linkTweet thisAlerts:
@FangJul 01.2004 — This one doesn't crash IE:

width:expression(document.body.clientWidth [COLOR=red]<[/COLOR] (500/12) * parseInt(document.body.currentStyle.fontSize)? "30em":"auto" );
Copy linkTweet thisAlerts:
@redijediauthorJul 01.2004 — Interesting workaround, but it still crashes for me. I think I'll just hardcode the width for IE browsers.

Thanks for the help, though.
Copy linkTweet thisAlerts:
@FangJul 01.2004 — Works for me IE 5+ XP
×

Success!

Help @redijedi spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...