Forum Moderators: not2easy

Message Too Old, No Replies

Safari and max-width / min-width?

Does it not work or is it me?

         

davidbraun

8:24 am on Feb 18, 2005 (gmt 0)

10+ Year Member



Hi Wizards!

It seems to me that Safari doesn't (yet?) understand the attributes "max-width" (if position: absolute, postition: relative is fine) and "min-width" (if there is a width: n)...
Is that so, or could it be that I do faulty css?

the CSS:
div#container {
position: absolute; left: 5%; width: 85%;

max-width: 800px;
min-width: 400px;
}

Already: Thanks!
david

dcrombie

5:08 pm on Feb 18, 2005 (gmt 0)



Quoting Dave Hyatt:

"Many standards charts have asserted that Safari supports min-width and max-width. How wrong you are. Safari only supports these properties on non-positioned non-replaced elements..."

;)

davidbraun

5:27 pm on Feb 18, 2005 (gmt 0)

10+ Year Member



Um - this might be the most recent version only, but I am poking around with exactly this a the moment, and guess what? It works!

Here's what I've got (cropped irrelevant bits):

div.timeline {
position: absolute;
bottom: 24px;
width: 9px;
overflow: hidden;

}

div.timeline:hover {
width: auto;
min-width: 9px;
max-width: 96px;
}

and the results are what one would expect.

Remove the max-width, and the div expands to the line's length, remove the min-width, and an empty <div> shrinks to nothing upon hovering... Leave it there, and all is well...

stumbled (I couldn't get it to work a few hours ago...) myself. Maybe Safari can't do if there's some other width defined, such as percentages etc...