Skip to content Skip to sidebar Skip to footer

Positioning H1 And H2 With CSS

I have a css layout. I have the divs #header, #content and #footer inside a #wrapper. The issue is that the explorer shows the h1 and h2 elements inside the #content div, not in #h

Solution 1:

I'd suggest that you add overflow: hidden to the #header css, which forces it expand to 'wrap' around its child elements, and does so with no need for extraneous mark-up.


Solution 2:

You have floated the headers, therefore the wrapping "header" has no height. Insert a clearing element at the end of the header and your problem should be gone:

<div id="header">
        <h1 class="divisor_izquierda">Felipe López</h1>
        <h2 class="divisor_derecha">DISEÑO WEB</h2>
        <div style="clear: both;"></div>
</div>

Post a Comment for "Positioning H1 And H2 With CSS"