Currently, I am tackling a project for my college course, and the navigation bar is posing some challenges. Despite conducting various research attempts to resolve the issue, the site remains quite basic as it stands as just a template. Primarily, my objective for the navigation bar was to center it on the main background image while enabling the "Rooms" tab to have a dropdown functionality.
nav {
background-color: transparent;
}
nav a {
color: #F2E2C4;
text-align: center;
padding: 10px;
text-decoration: none;
font-size: 20px;
font-weight: bold;
display: inline-block;
text-decoration: none;
position: relative;
font-family: 'Spartan';
}
nav ul {
padding: 0px;
margin: 0px;
list-style-type: none;
}
nav a.beachview {
float: left;
color: #F2E2C4;
text-align: center;
padding: 0px 16px;
text-decoration: none;
font-size: 45px;
padding-top: 2px;
font-family: 'Spartan';
}
nav a:hover {
background-color: none;
color: #8C8474;
}
nav ul ul {
display: none;
position: absolute;
}
nav ul li:hover ul {
display: inline-block;
}
nav ul ul li {
float: none;
}
nav li {
float: left;
}
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<title>Beachview - Home</title>
<meta name="author" content="Your Name">
<meta name="description" content="Example description">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<link rel="icon" type="image/x-icon" href="" />
<link href="https://fonts.googleapis.com/css?family=Dosis&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Spartan&display=swap" rel="stylesheet">
</head>
<body>
<div class="bg-img">
<div class="container">
<nav>
<ul>
<li><a href="#">ROOMS</a>
<ul>
<li><a href="#">GLASGOW</a></li>
<li><a href="#">EDINBURGH</a></li>
<li><a href="#">ABERDEEN</a></li>
<li><a href="#">DUNDEE</a></li>
</ul>
</li>
<li><a href="#">GALLERY</a></li>
<li><a class="beachview" href="#">BEACHVIEW</a></li>
<li><a href="#">LOCAL</a></li>
<li><a href="#">CONTACT</a></li>
</ul>
</nav>
</div>
</div>
<main>Main stuff goes here</main>
</body>
</html>
I'm not entirely certain if the above information makes sense since the background image does not seem to be loading properly.