Note that there are some explanatory texts on larger screens.

plurals
  1. POHTML elements with different heights in different browsers
    primarykey
    data
    text
    <p>I'm fooling around with HTML and CSS a little and i encountered an issue i cant seem to resolve. Heres a link to and image of the problem:</p> <p>![enter image description here][1]</p> <p>The upper part is Firefox, which displays it the way I want it to.</p> <p>Below that is Chrome (IE shows it like Chrome). As you can see, the yellow parts height isn't enough for the picture.</p> <p>Here's the code:</p> <pre><code>&lt;section id="top-content"&gt; &lt;div id="top-content-upper"&gt; &lt;h2&gt;Welcome to our Site&lt;/h2&gt; &lt;p&gt;Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate &lt;/p&gt; &lt;a href="#"&gt;Learn More&lt;/a&gt; &lt;a href="#"&gt;Our Work&lt;/a&gt; &lt;/div&gt; &lt;img src="dragon.jpg" alt="dragon" id="featured1"&gt; &lt;img src="underconstrcution.jpg" alt="under construction" id="featured2"&gt; &lt;div id="breadcrumbs"&gt;Youre here: Home &gt; Welcome&lt;/div&gt; &lt;/section&gt; </code></pre> <p>and the CSS:</p> <pre><code>#top-content { background: green; padding: 20px 10px; position: relative; } #top-content-upper { background: yellow; padding: 15px 50% 15px 10px; } #top-content-upper h2 { margin-bottom: 15px; } #breadcrumbs { background: red; padding: 5px 0 5px 15px } #featured1 { position: absolute; top: 40px; left: 600px; z-index:2; } #featured2 { position: absolute; top: 80px; left: 640px; z-index:1; } </code></pre> <p>Thanks alot for all the answers. For now i solved it using min-height. Im going to try floating though. And thanks for the link to the box sizing article</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.
 

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