Afficher un message
Vieux 20/03/2008, 03h34   #1
Jeff
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut min-height current wisdom

I need to set a minimum height for a div, yet have it expand with the
contents.

I have this from 2005:

<style type="text/css">
div{
height: 12px;
background-color: red;
1px solid black;min-height:12px
}

html>body div{
height: auto; /* for not-IE */
}
</style>

<div>one<br>two</div>
<br>
<div></div>

That works in my Firefox 2.0, Opera 9 and IE6 win XP.

Is that still the current best wisdom on this task? This still works
in IE7?

Jeff
  Réponse avec citation
 
Page generated in 0,04019 seconds with 9 queries