Min-height & Min-width

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Min-height & Min-width

Post by Luke »

Since min-height and min-width don't seem to work with IE, what can I do to enforce that something as at least a certain width or height?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

place something in it that large. :)
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

haha thanks a lot man... funny thing is, that's what I did. Still not working qluite right, but I think I'm on the right track.
User avatar
Oren
DevNet Resident
Posts: 1640
Joined: Fri Apr 07, 2006 5:13 am
Location: Israel

Post by Oren »

You can always use hacks... Here are few lines of a CSS code I used on a site I built:

Code: Select all

* html div#cell_1
{
	height: 500px;

	/*
		Since IE doesn't understand the min-width and
		min-height commands, but instead interprets width
		and height as min-width and min-height we use this
		css hack and in that way the above code will be read
		only by IE.
	*/
}



html>body div#cell_1
{
	min-height: 500px;

	/*
		On the other hand, this code will be read by all
		browsers but IE since IE doesn't understand the child
		selector command.
	*/
}
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

ya know what... screw IE. There I said it!
User avatar
Oren
DevNet Resident
Posts: 1640
Joined: Fri Apr 07, 2006 5:13 am
Location: Israel

Post by Oren »

The number of IE users is too big... You can't ignore it :(
matthijs
DevNet Master
Posts: 3360
Joined: Thu Oct 06, 2005 3:57 pm

Post by matthijs »

I just install FF on every machine I can (friends, family, etc) each time I'm called in to help with some computer problem :) Even if I can contribute a tiny bit to a more even browser market, I'm happy.

And for browser/IE hacks I use conditional comments and seperate stylesheets for IE. Maybe with IE7 at the end of the year and IE6 fading away I can delete those files at some time. No more hacks in my css :)
User avatar
seodevhead
Forum Regular
Posts: 705
Joined: Sat Oct 08, 2005 8:18 pm
Location: Windermere, FL

Post by seodevhead »

In IE... the height property acts as the min-height property.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

supposedly width acts as min-width too, but that doesn't seem to be the case for me. width acts as the width.
Post Reply