Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using Style relative creates empty area
Message
From
26/02/2013 20:21:07
 
 
To
22/02/2013 18:59:56
General information
Forum:
HTML5
Category:
HTML
Miscellaneous
Thread ID:
01566796
Message ID:
01567003
Views:
53
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform