PDA

View Full Version : CSS position:relative bug.


ReservePhilipp
11-29-2006, 01:00 PM
<div style="border: 1px solid #a1a1a1; width:320px; height: 210px;">
<div style="color:#000000; font-family:verdana; font-weight: bold; font-size:22px; padding-left:26px; width:100%;">Easy Rider</div>
<img src="Mine bilder/everest.jpg" width="17" height="120" alt="" style="float:left;">
<div style="color:#000000; font-family:verdana; font-size: 9px; width:120px; float:left; padding-top:10px;padding-left:5px; ">Vår rimeligste sykkel. For enkel bruk. Sykkelen har aluminiumsramme og støtdemper. Robuste dekk gjør sykkelen ideel for ujevne sentrumsgater.</div>
<img src="Mine bilder/Untitled-1.jpg" width="170" height="100" alt="" style=" left: 145px;top: 43px;margin-top:10px;">
<div style="color:#000000; font-family:verdana; font-style: italic;font-weight: bold;font-size: 65px; width:100%; text-align: right; position:relative; top:-25px;">1299,-</div>
<div style="color:#386384; font-family:verdana; font-style: italic;font-weight: bold;font-size: 65px; width:100%; text-align: right; position:relative; top:-105px; left:-2px;">1299,-</div>
<div style="color:#000000; font-family:verdana; font-style: italic;font-size: 10px; left: 120px; top: 190px; width:130px; text-align: right;position:relative; top:-115px; left:100px;">Veil 2999,-</div>
</div>



Hi, how do i fix the problem that the border of the outer div is much lower than expected?

Its like det div's with position:relative that f##ks up...
It like it resizes the outer div to fit al the content and then repositionates them. But how do i get rid of that "white space" below the content?
Better way of doing it?



(sorry for my bad english)

_Aerospace_Eng_
11-29-2006, 03:09 PM
You don't. This is the thing with position:relative. The space it was originally in is still occupied. It doesn't go away.