Every time I try to adjust the browser size, the navigation menu seems to collapse within itself, creating a strange effect. I can't figure out what's causing this issue.
I've experimented with max-width and sometimes including the "wrapper" in a div only adds to the confusion.
@font-face {
src: url(fonts/Modric.ttf);
font-family: Modric;
}
@font-face {
src: url(fonts/Orkney-Regular.ttf);
font-family: Orkney;
}
@font-face {
src: url(fonts/Made-Bon-Voyage.otf);
font-family: Made-Bon-Voyage;
}
* {
box-sizing: border-box;
}
body {
background-color: #262c2c;
}
.navbar {
max-width: 75%;
height: 100px;
margin-right: auto;
margin-left: auto;
}
.navbar a {
float: left;
padding: 40px;
background-color: #262c2c;
text-decoration: none;
font-size: 25px;
width: 25%;
/* Four links of equal widths */
text-align: center;
color: #dae1e7;
font-family: Orkney;
}
h1 {
text-align: center;
font-family: Orkney;
}
img {
max-width: 100%;
height: auto;
display: block;
opacity: 50%;
margin-left: auto;
margin-right: auto;
}
#wrapper {
max-width: 1000px;
margin-left: auto;
margin-right: auto;
padding-right: 50px;
padding-left: 50px;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="navigation.css">
<title>Pasetta Studios</title>
</head>
<body>
<div id="wrapper">
<div class="navbar">
<a href="#index.html">Home</a>
<a href="#about.html">About</a>
<a href="#projects.html">Projects</a>
<a href="#contact.html">Contact</a>
</div>
<img src="images/top-image.jpg" alt="plants">
<img src="images/second-image.jpg" alt="benches">
<img src="images/third-image.jpg" alt="cactus">
<img src="images/last-image.jpg" alt="more cactus">
<img src="images/pasetta-studios" alt="pasetta studios">
<code>Designed by Pasetta Studios. Built by Abraham.</code>
</div>
</body>
</html>