콘텐츠가 포함 된 6 개의 개별 상자를 만들려고합니다. 그러나 세로로 구분하지 않고 가로로만 분리 할 수 있습니다. 예를 들어 상자는 '너비'를 사용하여 가로 방향으로 간격을 두어 배치 할 수 있지만이 이미지의 상자를이 이미지로 이동하려고하면 세로로 분리되어 두 개가 아닌 쌍으로 머물러 있지 않습니다. 누구든지 해결책을 안다면, 크게 감사하겠습니다. 감사합니다 :)html/css에서 그룹 콘텐츠를 세로로 분리하는 방법은 무엇입니까?
body {
background-color: #323232;
max-width: 960px;
padding: 0;
margin: 0;
font-family: Lato;
}
nav a {
color: #fff;
text-decoration: none;
padding: 20px 25px;
display: inline-block;
}
.fixed-header, .fixed-footer {
background: #333;
color: #fff;
width: 100%;
position: fixed;
text-align: center;
z-index: 10;
background-color: #202020;
}
.fixed-header {
top: 0;
}
.fixed-footer {
bottom: 0;
padding: 20px 0px;
}
.fixed-header a:hover {
color: #c1c1c1;
}
.fixed-footer a {
color: #fff;
font-weight: lighter;
text-decoration: none;
}
.group-content {
max-width: 960px;
text-align: center;
}
.group-content h3 {
font-weight: normal;
font-size: 20px;
color: white;
}
.group-content p {
font-weight: lighter;
font-size: 20px;
color: white;
}
.content {
display: inline-block;
width: 30%;
background-color: #202020
}
@font-face {
font-family: "Lato";
font-weight: normal;
font-style: normal;
src: url('fonts/Lato-Regular.eot'),
src: url('fonts/Lato-Regular.eot?#iefix') format('embedded-opentype'),
url('fonts/Lato-Regular.ttf') format('truetype'),
url('fonts/Lato-Regular.woff') format('woff'),
url('fonts/Lato-Regular.woff2') format('woff2');
}
@font-face {
font-family: "Lato";
font-weight: bold;
font-style: normal;
src: url('fonts/Lato-Bold.eot'),
src: url('fonts/Lato-Bold.eot?#iefix') format('embedded-opentype'),
url('fonts/Lato-Bold.ttf') format('truetype'),
url('fonts/Lato-Bold.woff') format('woff'),
url('fonts/Lato-Bold.woff2') format('woff2');
}
@font-face {
font-family: "Lato";
font-weight: lighter;
font-style: normal;
src: url('fonts/Lato-Light.eot'),
src: url('fonts/Lato-Light.eot?#iefix') format('embedded-opentype'),
url('fonts/Lato-Light.ttf') format('truetype'),
url('fonts/Lato-Light.woff') format('woff'),
url('fonts/Lato-Light.woff2') format('woff2');
}
<!DOCTYPE html>
<html lang="en">
<head>
<title>Kumo99.cf</title>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="icon" href="favicon.ico">
</head>
<body>
<div class="fixed-header">
<nav>
<a href="index.html">HOME</a>
<a href="projects.html">PROJECTS</a>
<a href="about.html">ABOUT</a>
</nav>
</div>
<div class="fixed-footer">
<a href="https://steamcommunity.com/id/kumo99">Made by Kumo © 2018</a>
</div>
<div class="group-content">
<div class="content">
<img src="https://i.imgur.com/Xde6duk.png">
<h3>Arma 3: Exile Server</h3>
<p>A project for improving the exile mod.</p>
</div>
<div class="content">
<img src="https://i.imgur.com/Xde6duk.png">
<h3>Reserved Space</h3>
<p>Reserved space for future projects</p>
</div>
<div class="content">
<img src="https://i.imgur.com/Xde6duk.png">
<h3>Reserved Space</h3>
<p>Reserved space for future projects</p>
</div>
<div class="content">
<img src="https://i.imgur.com/Xde6duk.png">
<h3>Reserved Space</h3>
<p>Reserved space for future projects</p>
</div>
<div class="content">
<img src="https://i.imgur.com/Xde6duk.png">
<h3>Reserved Space</h3>
<p>Reserved space for future projects</p>
</div>
<div class="content">
<img src="https://i.imgur.com/Xde6duk.png">
<h3>Reserved Space</h3>
<p>Reserved space for future projects</p>
</div>
</div>
</body>
</html>
'.content {margin-bottom : 4px;} ' – Chiller
작동하지 않아 상자의 배경색이 사라집니다. –