Jump to content
php.lv forumi

Firefox da CSS


Qued

Recommended Posts

Kavacky

Ok, piedāvā, lūdzu, man citu variantu, kā uztaisīt kolonnas.

<style type="text/css">
#container {
border: 1px solid blue;
margin-left: auto;
margin-right: auto;
width: 400px;
}
#col1 {
width: 100px;
background-color: #AAA;
}
#col2 {
width: 200px;
background-color: #CCC;
}
#col3 {
width: 100px;
background-color: #DDD;
}
</style>
<div id="container">
<div id="col1">bla bla bla</div>
<div id="col2">bla bla bla bla bla bla bla bla bla bla bla bla </div>
<div id="col3">bla bla bla</div>
</div>

Un viss vienā kolonnā. Vai arī tev vajag vairākas?

Link to comment
Share on other sites

Nuja. 3 gab. Katru colN div'u savā kolonnā.
<style type="text/css">
#container {
border: 1px solid blue;
margin-left: auto;
margin-right: auto;
width: 400px;
}
#col1 {
display: inline;
width: 100px;
background-color: #AAA;
}
#col2 {
display: inline;
width: 200px;
background-color: #CCC;
}
#col3 {
display: inline;
width: 100px;
background-color: #DDD;
}
</style>
<div id="container">
<div id="col1">bla bla bla</div>
<div id="col2">bla bla bla bla bla bla bla bla bla bla bla bla </div>
<div id="col3">bla bla bla</div>
</div>

Link to comment
Share on other sites

×
×
  • Create New...