dongnao3990
2015-10-24 06:32
浏览 5
已采纳

为什么div会向左边缘运行?

I am new to css and php, i want to retrieve information from db via php and display it to the user, all working fine but problem is with the UI part enter image description here and my code is

<?
$result=mysql_query($query) or die (mysql_error());
echo "<div class='container'>";
while($row =mysql_fetch_array($result)) 
{
    echo "<div class='row custom1'>";
    echo "<div class='col-sm-12' id='dd' style='border-style:solid; border-width:1px; margin-left:10px; margin-top:20px'><a href='showit.php' class='kk'>";
    echo '<p class="head1">QUESTION:',$row['title'],'</p><p clsss="head2" style="font-size:20px;"></br>Tags:',$row['tags'],'</br>Posted by:',$row['posted'],'</br>Posted On:',$row['postedon'],'</p>';
    echo "</div>";
}
echo "</div>";
?>

is there any way to align the divs properly?

2条回答 默认 最新

相关推荐 更多相似问题