2016-04-04 11 views
0

コンテナは最初の行を処理しますが、フロートが2番目の行を開始させると2番目の行は処理されません。どのようにして踏み込むことを防ぐことができますコンテナCSSフロートステッピング

Div step

HTML

echo "<div class='img-container'><div class='circular--portrait'><img src=\"" . $row["IMG_URL"]. "\" /></div><br><div class='caption'><h1>". $row["FirstName"]. "</h1><p>" . $day_month ."</p></div></div><br>"; 

CSS

.img-container{ 
width: 200px; 
margin:1em; 
display:inline; 
float:left; 
} 
.circular--portrait { 
    width: 200px; 
    height: 200px; 
    overflow: hidden; 
    border-radius: 50%; 
    background-size: cover; 
    background-repeat: no-repeat; 
    background-position: center center; 
    -webkit-border-radius: 99em; 
    -moz-border-radius: 99em; 
    border-radius: 99em; 
    border: 5px solid #eee; 
    box-shadow: 0 3px 2px rgba(0, 0, 0, 0.3); 
} 

.circular--portrait img { 
    width: 100%; 
    height: auto; 
    margin-top: -25px; 
} 
+0

echo文ではなく出力されたHTMLだけを共有してください:-) – TylerH

答えて

0

はあなたの<br>タグを削除し、それは問題ないはずです。

関連する問題