HTML CSS - , .
header .
header , h1 nav, .
, header, text-align: center .
header , white-space: nowrap, ( ).
, .
, nav vertical-align: top, .
, height header, line-height, ( , ).
header {
height: 60px;
line-height: 60px;
width: 85%;
margin: 0 auto;
border: 1px dotted blue;
text-align: center;
white-space: nowrap;
}
header h1 {
display: inline-block;
border-right: 1px solid black;
margin: 0;
padding-left: 10px;
padding-right: 10px;
height: 100%;
}
header h1 a {
text-shadow: 1px 2px lightgrey;
}
header h1:hover a {
color: #f2f2f2;
}
header a {
text-decoration: none;
color: #333;
}
.button:hover {
background-color: #f2f2f2;
}
.active {
text-decoration: underline;
}
nav {
display: inline-block;
vertical-align: top;
padding-left: 10px;
font-weight: bold;
font-size: 1.3em;
border: 1px dotted gray;
}
nav a {
margin: 0 20px;
}
<header>
<h1><a href="index.html">H1 TEXT HEREEEEE</a></h1>
<nav>
<a href="index.html" class="button active">Home</a>
<a href="profil.html" class="button">About</a>
<a href="mdu.html" class="button">MDU</a>
</nav>
</header>
Hide result