Note that there are some explanatory texts on larger screens.

plurals
  1. POGetting <divs>'s to align next to each other
    text
    copied!<p>I have the following code I am trying to get working correctly:</p> <pre><code>&lt;div id="newspost_bg"&gt; &lt;article&gt; &lt;p&gt; &lt;header&gt;&lt;h3&gt;The fast red fox!&lt;/h3&gt;&lt;/header&gt; This is where the article resides in the article tag. This is good for SEO optimization. &lt;footer&gt;Read More..&lt;/footer&gt; &lt;/p&gt; &lt;/article&gt; &lt;/div&gt; &lt;div id="newspost_bg"&gt; hello &lt;/div&gt; &lt;div id="newspost_bg"&gt; hello &lt;/div&gt; &lt;div id="advertisement"&gt; &lt;script type="text/javascript"&gt;&lt;!-- google_ad_client = "ca-pub-2139701283631933"; /* testing site */ google_ad_slot = "4831288817"; google_ad_width = 120; google_ad_height = 600; //--&gt; &lt;/script&gt; &lt;/div&gt; </code></pre> <p>Here is the css that goes with it:</p> <pre><code>#newspost_bg{ position: relative; background-color: #d9dde1; width:700px; height:250px; margin: 10px; margin-left: 20px; border: solid 10px #1d2631; float:left; } #newspost_bg article{ position: relative; margin-left: 20px; } #advertisement{ float: left; background-color: #d9dde1; width: 125px; height: 605px; margin: 10px; } </code></pre> <p>The problem I'm experiencing is that the advertisements im trying to get setup will align with the last with the id of newspost_bg but im looking to havce it align to the top of the container it is in. I dont know if this is enough info, if not please let me know what you might need. Im new to the web coding scene so any and all critiques help me.</p>
 

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