Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There are a few things to mention here but I'll start with the reason for the gap in between the two sections.</p> <p>From what I can see from your inline styles you have used <code>position: relative</code> and varying <code>top</code> and<code>left</code> values to achieve the desired layout. On the element with ID <code>personnelContainer</code> you have added <code>top: -230px</code>. This is what is causing the gap.</p> <p>When you position an element relatively you have to imagine that the element is in its original position and that you've just visually moved it. In other words, moving the element does not change the flow of the page, so applying the negative top value as in your example will not change the height of the container. (good reference: <a href="http://reference.sitepoint.com/css/relativepositioning" rel="nofollow">http://reference.sitepoint.com/css/relativepositioning</a>)</p> <p>With this in mind, you could go the route of applying minus <code>top</code> values to each of the sections that follow in order to close the gap, however you are likely to find that this complicates matters further and leads to overlapping content.</p> <p>The best advice I can give is to read the following articles on floated layouts:<br> <a href="http://css-tricks.com/all-about-floats/" rel="nofollow">http://css-tricks.com/all-about-floats/</a><br> <a href="http://www.quirksmode.org/css/clearing.html" rel="nofollow">http://www.quirksmode.org/css/clearing.html</a><br> <br> Relative positioning has its applications but in this case you should use the <code>float</code> property to achieve your layout. If you read the articles above it will give you a good grounding in floated layouts and how to ensure your sections contain everything correctly. As long as you don't set any fixed heights on any of the child elements you will find they expand to accommodate any amount of content.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload