Jump to content
php.lv forumi

position: relative ; absolute


nekonesaprotu

Recommended Posts

Kāpēc, kad position: absolute nomaina uz relative, atstarpe starp <div> un augšu nedaudz palielinās?

 

body {
 background: #dddddd;
}

div.galvenais_konteineris {
 background: #c5c5c5;
 position: absolute;
 width: 1000px;
 height: 600px;
 border: dashed black 1px;
 top: 20px;
}

 

un

 

<body>
 <div class="galvenais_konteineris">
 </div>
</body>

Link to comment
Share on other sites

×
×
  • Create New...