body {
font-family: Arial, sans-serif;
margin: 0;
position: relative;
}
header {
background-color: #333;
color: white;
text-align: center;
padding: 10px;
}
header img {
max-width: 100%;
height: auto;
}
nav {
background-color: #ddd;
overflow: hidden;
width : 100%;
display: flex;
flex-direction: row;
}
nav ul {
list-style-type: none;
margin: 0;
padding: 0;
}
nav li {
float: left;
padding : 0 10px;
}
nav li a {
display: block;
color: #333;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
nav li a:hover {
background-color: #ccc;
}
main {
padding: 2em;
}
.center {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
img {
max-width: 100%;
max-height: 100%;
}
form {
margin: 20px;
padding: 20px;
border: 1px solid #ccc;
border-radius: 10px;
background-color: #f5f5f5;
}
label {
display: block;
margin-bottom: 10px;
}
input[type="text"],
input[type="email"],
input[type="password"],
select {
display: block;
width: 100%;
padding: 8px;
margin-bottom: 10px;
border: 1px solid #ccc;
border-radius: 4px;
}
input[type="submit"] {
background-color: #4CAF50;
color: white;
padding: 10px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
}
input[type="submit"]:hover {
background-color: #45a049;
}
#error-message {
color: red;
margin-top: 10px;
}
footer {
position: absolute;
bottom: 0;
width: 100%;
height: 50px;
background-color: #333;
color: #fff;
text-align: center;
padding-top: 15px;
}
.items-grid {
display: grid;
grid-template-columns: 1fr 2fr;
grid-gap: 20px;
margin: 20px;
}
.items-form {
background-color: #f1f1f1;
padding: 20px;
}
.items-form label {
display: block;
margin-bottom: 10px;
}
.items-form input[type="text"],
.items-form input[type="number"],
.items-form select {
display: block;
width: 100%;
padding: 10px;
border: none;
border-radius: 4px;
margin-bottom: 20px;
box-sizing: border-box;
}
.items-form input[type="submit"] {
background-color: #4CAF50;
color: white;
padding: 12px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
}
.items-form input[type="submit"]:hover {
background-color: #45a049;
}
.items-display {
background-color: #fff;
padding: 20px;
}
.items-display h3 {
margin-top: 0;
}
#item-info {
font-size: 16px;
margin-bottom: 20px;
}
#item-image {
text-align: center;
}
#item-image img {
max-width: 100%;
height: auto;
margin-top: 20px;
}
.container {
display: flex;
justify-content: space-between;
}
.chart {
width: 50%;
}
.summary {
width: 45%;
}
canvas {
height: 300px;
}
CSS
복사