Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using Style relative creates empty area
Message
De
26/02/2013 20:21:07
 
 
À
22/02/2013 18:59:56
Information générale
Forum:
HTML5
Catégorie:
HTML
Divers
Thread ID:
01566796
Message ID:
01567003
Vues:
54
This message has been marked as the solution to the initial question of the thread.
>Here is the tricky part.
>
>I found this by coincidence as this is very difficult to find something in regards to this:
>
>http://stackoverflow.com/questions/5868849/relative-positioning-of-div
>
>It is the very bottom paragraph.
>
>In order to avoid the gap, we need to adjust the style of the object to be fixed and add the Margin-Bottom style for the equivalent of the gap.
>
>So, this:
>
>
><DIV Style="Position: Relative; Top: -22px; Left: 78px;">
>
>
>...becomes this:
>
>
><DIV Style="Position: Relative; Top: -22px; Left: 78px; Height: 20px; Margin-Bottom: -20px;">
>
That's how relative works, so don't use it here.

Make that div (everything should be lowercase. Btw) position:absolute and then make its parent element position:relative. Then the absolute will position itself absolutely within its parent.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform