현재 회사 웹 사이트를 만들고 있는데 로고가 있지만 네비게이션 바 안에 넣고 싶습니다. 맨 오른쪽에 있지만 네비게이션 바 높이의 중간에 정렬하십시오. 나는 CSS를 사용하여 이것을하고 싶다.내 탐색 표시 줄에서 CSS를 사용하여 로고를 정렬하려면 어떻게합니까?
여기 내 index.html입니다. 당신이 내 질문에 대답을 은닉에 전혀 더 이상 설명 또는 아무것도 필요하면
<!DOCTYPE html>
<html>
<head>
<title>Responsive Navigation Bar</title>
<link rel="stylesheet" type="text/css" href="main.css">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<img src="images/logo.png" alt="Logo" id="logo" onclick="location.replace('index.html', '_top')">
<div class="nav">
<label for="toggle">☰</label>
<input type="checkbox" id="toggle"/>
<div class="menu">
<a href="index.html">Home</a>
<a href="#Business">Business</a>
<a href="#Services">Services</a>
<a href="#LearnMore">Learn More</a>
<a href="#FreeTrial"><span id="freetrial">Free Trial</span></a>
</div>
</div>
</body>
</html>
그리고 여기 내 main.css가
html, body {
width: 100%;
height: 100%;
margin: 0;
}
html {
font-family: "helvetica neue", sans-serif;
}
/* Navigation Bar */
#logo {
text-align: right;
float: right;
}
.nav {
border-bottom: 1px solid #EAEAEB;
text-align: right;
height: 70px;
line-height: 70px;
}
.menu {
margin: 0 30px 0 0;
}
.menu a {
clear: right;
text-decoration: none;
color: grey;
margin: 0 10px;
line-height: 70px;
}
#freetrial {
color: #54D17A;
}
label {
margin: 0 40px 0 0;
font-size: 26px;
line-height: 70px;
display: none;
width: 26 px;
float: right;
}
#toggle {
display: none;
}
@media only screen and (max-width: 500px) {
label {
display: block;
cursor: pointer;
}
.menu {
text-align: center;
width: 100%;
display: none;
}
.menu a {
display: block;
border-bottom: 1px solid #EAEAEB;
margin: 0;
}
#toggle:checked + .menu {
display: block;
background-color: white;
}
}
, 난 당신을 도와 드리 겠 이상이 될 제공합니다 그것은 내가 실제로 하하에게 대답 할 수있는 무엇인가입니다.