I have this problem that always occurs when I'm using display: inline-block
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.
I have included the HTML, CSS and a link to the page in question.
I'm using PHP as well.
http://www.carbondelight.co.uk/gallery.php
#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;
}
HTML
<p class='textshadow'>Please take a look at our gallery of parts.</p>
<div id='g-con'>
for ( $j = 0 ; $j < $rows ; ++$j )
{
$row = mysql_fetch_row($result);
$sql2 = "SELECT name,price,carID,categoryID FROM partTable WHERE partID='$row[5]'";
$result2 = performQuery($sql2);
<div class='giiCon'><img src='$image$row[1]' /><p>$result2[0]</p><br /><p>hello</p>
</div>
}
$result2[0]
hello
` indicates to me that there's probably a misconception existing. – polarblau Nov 02 '11 at 13:24