Forums

CSS

This topic is locked

CSS max-height is not supported

Posted 17 May 2007 04:18:50
1
has voted
17 May 2007 04:18:50 Kylie Jensen posted:
Hi
I am using dreamweaver to create my website and in the results section that picks up all your errors, I keep getting errors when I use property max-height - cs property max-height is not supported (internet explorer and safari)

what can i do?

Edited by - kyliejensen on 17 May 2007 04:21:29

Replies

Replied 23 May 2007 15:45:22
23 May 2007 15:45:22 Andrew Peace replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Hi
I am using dreamweaver to create my website and in the results section that picks up all your errors, I keep getting errors when I use property max-height - cs property max-height is not supported (internet explorer and safari)

what can i do?

Edited by - kyliejensen on 17 May 2007 04:21:29
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Dreamweaver is freaking out because IE6 and below does NOT support this attribute. When you use it, IE6 completely ignores it, so your element just shrinks to fit the smallest size it can, like it would if it didn't have the min-height attribute.

Fortunately, IE7 DOES support this attribute. Everyone will be switched to IE7 within a couple of years. Many people already have switched.

So, Dreamweaver was right to warn you. Here is the best fix I can think of:

<pre id=code><font face=courier size=2 id=code>
/*just for IE6*/
.myClass{
height: 10px;
}
/*for standards browsers*/
body &gt; .myClass{
min-height: 10px;
height: auto;
}

</font id=code></pre id=code>

Replace 10px with the min-height you want. Good luck! Let me know if you need more help.

Andrew Peace - Like my posts? You'll love my site

Reply to this topic