Hoe krijg ik het voor elkaar dat de (zwarte)container "meegroeit" met de langste box (box1, box2 of box3).
De container moet het liefst ook een min-height hebben.
Alvast bedankt,
Leo
#container {
position: relative;
width: 790px;
border: 1px black solid;
margin: 1em auto;
// height: 100%;
min-height: 200px;
background-color: black;
}
#box1 {
position: relative;
width:100px;
height: auto;
background:red;
float: left;
}
#box2 {
position: relative;
width:100px;
height: auto;
background:green;
float: left;
}
#box3 {
width:100px;
height: auto;
background:yellow;
float: left;
}
De container moet het liefst ook een min-height hebben.
Alvast bedankt,
Leo
#container {
position: relative;
width: 790px;
border: 1px black solid;
margin: 1em auto;
// height: 100%;
min-height: 200px;
background-color: black;
}
#box1 {
position: relative;
width:100px;
height: auto;
background:red;
float: left;
}
#box2 {
position: relative;
width:100px;
height: auto;
background:green;
float: left;
}
#box3 {
width:100px;
height: auto;
background:yellow;
float: left;
}
Laatst bewerkt: