flat: left;と記述しても、
contents-itemのところが横並びにならず
原因がわからず困っています。
わかる方がいれば教えていただけるとありがたいです。
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Progate</title> <link rel="stylesheet" href="stylesheet.css"> </head> <body> <!-- ここからHTMLを書き始めてください --> <div class="header"> <div class="header-logo">Progate</div> <div class="header-list"> <ul> <li>プログラミングとは</li> <li>学べるレッスン</li> <li>お問い合わせ</li> </ul> </div> </div> <div class="main"> <div class="copy-container"> <h1>HELLO WORLD<span>.</span></h1> <h2>プログラミングの世界へようこそ</h2> </div> </div> <div class="contents"> <h3 class="section-title">学べるレッスン</h3> <div class="contents-item"> <img src="https://s3-ap-northeast-1.amazonaws.com/progate/shared/images/lesson/html/study/html.svg"> <p>HTML & CSS</p> </div> <div class="contents-item"> <img src="https://s3-ap-northeast-1.amazonaws.com/progate/shared/images/lesson/html/study/php.svg"> <p>PHP</p> <div class="contents-item"> <img src="https://s3-ap-northeast-1.amazonaws.com/progate/shared/images/lesson/html/study/ruby.svg"> <p>Ruby</p> <div class="contents-item"> <img src="https://s3-ap-northeast-1.amazonaws.com/progate/shared/images/lesson/html/study/swift.svg"> <p>Swift</p> </div> </div> <div class="contact-form">コード
</body> </html></div>
CSS
html, body,
ul, ol, li,
h1, h2, h3, h4, h5, h6, p,
form, input, div {
margin: 0;
padding: 0;
}
body {
font-family: "Avenir Next", "Hiragino Kaku Gothic ProN W3", sans-serif;
}
li {
list-style: none;
padding: 33px 20px;
float: left;
}
.header {
background-color: #26d0c9;
color: #fff;
height: 90px;
}
.header-logo {
float: left;
font-size: 36px;
padding: 20px 40px;
}
.header-list li {
float: left;
padding: 33px 20px;
}
.copy-container h1 {
font-size: 140px;
}
.copy-container h2 {
font-size: px;
}
.copy-container span {
color: #ff4a4a;
}
.section-title {
border-bottom: 2px solid #dee7ec;
}
.contents-item {
float: left;
font-size: 25px;
}
.main {
padding: 100px 80px;
}
.contents {
height: 500px;
font-size: 25px;
}
.contact-submit {
background-color: #dee7ec;
color: #888eab;
}
.footer {
background-color: #2f5167;
color: #fff;
height: 120px;
padding: 40px;
}
.footer-logo {
float: left;
font-size: 32px;
}
.footer-list {
float: right;
}
.footer-list li {
padding-bottom: 20px;
}
h1 {
font-size: 140px;
float: none;
}
h2 {
font-size: 60px;
}
.header {
background-color: #26d0c9;
color: #fff;
height: 90px;
}
.header-logo {
font-size: 36px;
float: left;
padding: 20px 40px;
}