I'm also not sure how to alter the style to make all the elements of the navigation bar the same size, so if there's any suggestions for that, please share.
Код: Выделить всё
.topnav { /* navigation bar */
overflow: hidden;
position: absolute;
top: 0;
border: 0;
width: 100vw;
height:auto;
}
.title {
font-family: 'loveloblack';
border: 4px;
font-size: 28px;
float: center;
}
.topnav a { /* the objects inside the navigation bar */
float: left;
color: #000000;
text-align: center;
padding: 14px 24px;
text-decoration: none;
font-size: 36px;
border: 0;
font-family: 'opensansregular';
width: 10vw;
height: auto;
}
.background { /* the background div */
position: relative;
width: 100vw;
height: auto;
overflow: hidden;
border: 0;
}
a.image {
overflow: hidden;
}
a.image img{
width: 100%;
height: auto;
}
.topnav a:hover {
background-color: #ddd;
color: black;
}
.topnav a.active {
background-color: #04AA6D;
color: white;
}
< /code>
[img]background.PNG[/img]
[url=#home]
[img]logo.PNG[/img]
[/url]
[url=#events]Events[/url]
[url=#donate]Donate[/url]
[url=#contact]Contact[/url]
[url=#forvendors]For Vendors[/url]
Title
Подробнее здесь: https://stackoverflow.com/questions/795 ... ml-and-css