Note that there are some explanatory texts on larger screens.

plurals
  1. POIssues aligning bordered text boxes under images so they move together
    primarykey
    data
    text
    <p>Currently having issues trying to get these bordered text boxed to stay aligned with the above images in a way that when I re-size the page they stick with their prospective images. Currently I have them forced to stick under the images with margin css but once I re-size the boxes, the boxes all flee under the images.</p> <p>EDIT: Updated code - still having similar issues but this looks more promising - attaching photo of current state. <img src="https://i.stack.imgur.com/1shfH.jpg" alt="Current issue after updating code"></p> <pre><code> &lt;body&gt; &lt;div id="container"&gt; &lt;div id="header"&gt; &lt;img class="leaf" src="images/freshleaf.png" height="150px" alt="freshtext"/&gt; &lt;!--&lt;button class="navbutton"&gt; &lt;strong&gt; TEST &lt;/strong&gt; &lt;/button&gt;--&gt; &lt;/div&gt; &lt;div id="body"&gt; &lt;div id="main" class=""&gt; &lt;div class="column"&gt; &lt;img class="smart" src="images/phone1.png" height="500px" alt="phone1"/&gt; &lt;div class="box1"&gt; &lt;h3&gt;Pie is tasty Mmmmm...&lt;/h3&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="column"&gt; &lt;img class="smart" src="images/phone2.png" height="500px" alt="phone2"/&gt; &lt;div class="box2"&gt; &lt;h3&gt;Pie is tasty Mmmmm...&lt;/h3&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="column"&gt; &lt;img class="smart" src="images/phone3.png" height="500px" alt="phone3"/&gt; &lt;div class="box3"&gt; &lt;h3&gt;Pie is tasty Mmmmm...&lt;/h3&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; #body{ text-align: center; } #header { padding-bottom: 50px; text-align: center; } #main{ margin: 0 auto; text-align:left; width: 770px; } .column{ float:left; padding-left: 10px; } .column:first-child { padding-left: 0px; } .box1{ border: dotted; border-color: gray; padding: 2px 5px 2px 5px; max-width: 250px; text-align: center; } img.smart{ margin-left: auto; margin-right: auto; } </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