index.htmlに
<html lang="en"> <head> <meta charset="UTF-8"> <title>XOXO</title> </head> <body> <div class="heading"> <h1>LOVE YOU</h1> <h3>MISS YOU</h3> </div> <form class="form-inline" method="post" role="form"> <button type="submit" class="btn btn-primary btn-lg">ログイン</button> <input name="next" type="hidden" value="{{ next }}"/> <img class="detailimg" border="0" src="{% static 'detail.jpg' %}" alt="詳細"> </form> </body> </html>
と書きました。この
<img class="detailimg" border="0" src="{% static 'detail.jpg' %}" alt="詳細">
の画像を左寄せにしたいのですができません。
cssに
*{ margin: 0; padding: 0; } .clearfix::after{ content: ""; clear: both; display: block; } header{ width: 100%; height: 100px; background-color: pink; } nav{ width: 90%; height: 60px; margin: 0 auto; text-align: left; } .title{ float:left; color:white; font-size: 70px; margin-top:10px; padding-top:-30px; padding-bottom:30px; padding-left:80px; padding-right:80px; } .top-menu{ float: right; width: 30%; line-height: 30px; } #title{ display: inline; } .btn btn-primary btn-lg{ background-color: #F62459; } .heading{ float: left; padding-left:100px; } .newaccount{ float: right; } .detailimg{ float: left; }
と書いても左寄せにならず、
<img class="detailimg" border="0" src="{% static 'detail.jpg' %}" alt="詳細" align="left">
と書き換えても左寄せになりませんでした。なぜこれらの方法で左寄せにならないのでしょうか?
どう直せば左寄せになりますか?
detailimg以外のCSSを掲載いただけませんか?
情報の追加を行いました。もし何かお分かりならよろしくお願いいたします
回答1件
あなたの回答
tips
プレビュー