Note that there are some explanatory texts on larger screens.

plurals
  1. POHTML5 block positioning
    primarykey
    data
    text
    <p><a href="http://i.stack.imgur.com/SEFNd.png" rel="nofollow">http://i.stack.imgur.com/SEFNd.png</a></p> <p>I'm new to HTML5 so my code is likely to be messy, I'm trying to lay out block elements as shown above, but because I've chosen the body to float left it ends up below the slideshow. Here's how I've coded it:</p> <pre><code>#container { height: 800px; width: 985px; position:relative; } &lt;article&gt; &lt;span class="titlespacer"&gt;title text here&lt;/span&gt;&lt;/p&gt; &lt;ul&gt; &lt;li class="bodyspacer"&gt;Bullet&lt;/li&gt; &lt;span class="bodyspacer"&gt;&lt;br&gt; &lt;/span&gt; &lt;li class="bodyspacer"&gt;Bullet&lt;/li&gt; &lt;span class="bodyspacer"&gt;&lt;br&gt; &lt;/span&gt; &lt;li class="bodyspacer"&gt;Bullet&lt;/li&gt; &lt;span class="bodyspacer"&gt;&lt;br&gt; &lt;/span&gt; &lt;li class="bodyspacer"&gt;Bullet&lt;/li&gt; &lt;span class="bodyspacer"&gt;&lt;br&gt; &lt;/span&gt; &lt;li class="bodyspacer"&gt;Bullet&lt;/li&gt; &lt;/ul&gt; &lt;aside&gt; &lt;div id="slideshow"&gt; &lt;img src="images/polaroid1.jpg" width="320" height="332" class="polaroid"&gt; &lt;img src="images/polaroid2.jpg" width="320" height="332" class="polaroid"&gt; &lt;img src="images/polaroid3.jpg" width="320" height="332" class="polaroid"&gt; &lt;/div&gt; &lt;/aside&gt; &lt;/article&gt; </code></pre> <p>CSS</p> <pre><code> #slideshow { height: 332px; width: 320px; float: none; clear:both; } .bodyspacer { font-weight: normal; font-size: 18px; font-family: 'droid sans', Arial, Helvetica, sans-serif; text-align: left; display: block; float: left; width: 460px; padding-right: 70px; line-height: 20px; margin-left: 80px; padding-left: 5px; list-style-image: url(../fishing/images/rod.png); clear: none; overflow: hidden; } .titlespacer { font-family: 'Arvo', Arial, Helvetica, sans-serif; font-size: 22px; font-weight: 400; text-align: center; display: block; float: left; width: 435px; padding-left: 50px; padding-right: 50px; background-repeat: no-repeat; background-color: #1B378B; margin-right: 10px; height: 35px; color: #FFF; margin-top: 30px; padding-top: 10px; border: 3px double #FFF; margin-left: 40px; } </code></pre>
    singulars
    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. 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