Note that there are some explanatory texts on larger screens.

plurals
  1. PODisplay: inline-block text overflow causing alignment issue
    primarykey
    data
    text
    <p>I have this problem that always occurs when I'm using <code>display: inline-block</code> to display div's in line one by one. What happens is, when the text is bigger than the div and has to go onto a new line the following div's position/alignment is sort of indented. I have searched Overflow and I can't find anything that matches this problem.</p> <p>I have included the HTML, CSS and a link to the page in question.</p> <p>I'm using PHP as well.</p> <p><a href="http://www.carbondelight.co.uk/gallery.php" rel="nofollow noreferrer">http://www.carbondelight.co.uk/gallery.php</a></p> <pre><code>#g-con { width: 960px; min-height:300px; } #g-con img{ float:left; border: solid 3px #fff; -webkit-box-shadow: 0 0 5px #242424; box-shadow: 0 0 5px #242424; } .giiCon { background-image:url(../assets/images/giiCon_bg.jpg); background-repeat:repeat-x; margin: 10px; width: 270px; height: 106px; display:inline-block; border-radius: 0 5px 5px 0; -webkit-box-shadow: 0 0 5px #242424; box-shadow: 0 0 5px #242424; } </code></pre> <p>HTML</p> <pre><code>&lt;p class='textshadow'&gt;Please take a look at our gallery of parts.&lt;/p&gt; &lt;div id='g-con'&gt; for ( $j = 0 ; $j &lt; $rows ; ++$j ) { $row = mysql_fetch_row($result); $sql2 = "SELECT name,price,carID,categoryID FROM partTable WHERE partID='$row[5]'"; $result2 = performQuery($sql2); &lt;div class='giiCon'&gt;&lt;img src='$image$row[1]' /&gt;&lt;p&gt;$result2[0]&lt;/p&gt;&lt;br /&gt;&lt;p&gt;hello&lt;/p&gt; &lt;/div&gt; } </code></pre> <p></p>
    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.
 

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