PDA

View Full Version : Minimum Widths


Joe[y]
12-01-2005, 08:06 PM
ok. i'm working on a new template and as always i want to make sure it's cross-browser compatible but i'm having trouble. namely with the absolutely orgasmic bit of css min-width - it's great! it really is.

Problem:
IE doesn't know it!

Link:
http://dev.jlspurling.com/pixelpost/1.5/index.php?showimage=2

You'll notice a clear difference between firefox and IE on this image.

My Question:
Does anybody know how to safely set a minimum width in msIE using css? a hack even! just something. i'm stumped for ideas.

tinyblob
12-01-2005, 08:48 PM
i'm afraid i don't know anything about IE, all i know is that looks REALLY nice in Safari :)

Joe[y]
12-01-2005, 09:37 PM
cool i'm glad. i don't have access to safari so it's nice to hear it's looking alright.

raminia
12-01-2005, 09:44 PM
I used fixed size tables or divs with width equal to min-width required and keep them empty.
Sometimes I used a blank gif for that purpose;)

Joe[y]
12-01-2005, 09:51 PM
I used fixed size tables or divs with width equal to min-width required and keep them empty.
Sometimes I used a blank gif for that purpose;)

urgh - i hate code that's in practice just empty. i like to be able to code forms and structures within the used elements themselves.

but i guess your idea is the only option with IE. but i'll be damned if i'm using a table or a gif! :P

tinyblob
12-01-2005, 09:59 PM
Just detect the browser, and forward IE users to http://www.getfirefox.com

raminia
12-01-2005, 10:17 PM
Just detect the browser, and forward IE users to http://www.getfirefox.com
and kill Bill Gates ;)

Joe[y]
12-02-2005, 08:52 AM
Just detect the browser, and forward IE users to http://www.getfirefox.com

half of my friends use IE. i like the fact that they visit my website - although this template won't be used on my photoblog i'd still like to cater for the 'unenlightened'

tinyblob
12-02-2005, 09:02 AM
Yeah, i'm the same way.
My template originally didn't work with IE (transparent png flies) and i really wanted to just say - screw IE.
But that would mean most of my friends couldn't visit, so i had to spend time fixing it.

unseen
12-03-2005, 07:45 PM
its so hard to get people to use firefox. people are so adament about their ie... i know i was until i finally broke down and got ff (thanks to you guys)... now i'm trying to make all my friends get it.
anyway, the template looks great in ff but i see what you mean about ie. sorry i can't help, i started getting into coding after my conversion. heh :x

tinyblob
12-03-2005, 07:50 PM
yeah, i can't seem to convince people to use Firefox.
people are just gluttons for punishment.

raminia
12-03-2005, 08:15 PM
ask connie on this.

derevaun
12-04-2005, 05:46 AM
Maybe this is totally not what you want to do, but I used an addon to come up with a couple of derived widths (and pp tags) based on the image width. That way I don't need to use min-width when the image is around. It seems like you could code some minimum width functionality into a tag or two if you have a base width to go on.

I used it to set the width of a drop shadow div, for example. The code in that case is not semantic, but it works ( http://tuesdaycricket.averysworld.com ) Pardon the unfinished quality of the site :P

Connie
12-04-2005, 07:55 AM
Joey,

have a look here, maybe you find the answer for min-width:

http://www.webcredible.co.uk/user-friendly-resources/css/more-css-tricks.shtml

there is the chapter " Minimum width for a page" and more

Joe[y]
12-04-2005, 12:30 PM
Maybe this is totally not what you want to do, but I used an addon to come up with a couple of derived widths (and pp tags) based on the image width.

thanks thats a reasonable idea but i'd rather keep addons and templates separate (at least when releasing them to the public) i really like that template by the way... tell us when it's finished!

Joe[y]
12-04-2005, 12:33 PM
Joey,

have a look here, maybe you find the answer for min-width:

http://www.webcredible.co.uk/user-friendly-resources/css/more-css-tricks.shtml

there is the chapter " Minimum width for a page" and more

cheers connie. i never thought about using a javascript command in a cssheet - anyway. i'm having problems: can you understand why

min-width:630px;
width:expression(document.body.clientWidth < 630? "630px": "auto" );

that doesn't work - surely the width:expression defines the minimum width in IE ? i sooo hate IE. I'm using IE6 - can somebody with perhaps an older version see if it's working on their version?

Joe[y]
12-04-2005, 12:39 PM
ahah. found a little script here: http://www.doxdesk.com/software/js/minmax.html

this javascript makes IE understand min-width css - there's a split second render but i think this will be fixed once i reposition the script link higher up... and urrr... it doesnt work in IE on mac - but what does ?!

raminia
12-04-2005, 12:45 PM
isn't it about 630? "630px": "auto"
it might be 630 ? "630px": "auto" (addes space;) )

raminia
12-04-2005, 12:46 PM
http://archivist.incutio.com/viewlist/css-discuss/66882

Joe[y]
12-04-2005, 01:09 PM
i'm afraid that made no difference Ramin - i'm pretty certain it's my IE version that's affecting it. either way the new script does the job plus it's standard compliant!