Hi all,
Im new to the forums and just looking for some advice,
Im in the process of learning bootstrap and developing my first website by im having a really annoying issue trying to get a background color or image display behind my transparent navigation.
This is my html code so far
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>website</title>
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href='https://fonts.googleapis.com/css?family=Indie+Flower|Handlee' rel='stylesheet' type='text/css'>
<link href="css/style.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<nav class="navbar navbar-default" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#featured"><img id="main-logo" src="img/logo.svg"/></a>
</div><!-- end of navbar-header -->
<div class="collapse navbar-collapse" id="collapse">
<ul class="nav navbar-nav navbar-right">
<li class="active"><a href="#about-me">About Me</a></li>
<li><a href="#my-work">My Work</a></li>
<li><a href="#contact-me">Contact Me</a></li>
</ul>
</div><!-- end of collapse navbar-collapse -->
</div><!-- end of container -->
<div class="clearfix"></div>
</nav><!-- end of navigation -->
<div class="top-section">
<div class="about">
<h1>hello everyone</h1>
</div>
</div>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>
This is my current css stylesheet
body {
position: relative;
}
/*--Navigation--*/
.navbar-default {
background-color: transparent;
border: none;
}
.nav li a {
margin-top: 30px;
}
#main-logo {
float: left;
}
/*--Top Section--*/
.top-section {
background-color: #7ecaeb;
margin-top: 80px;
position: relative;
background-position: center;
background-size: cover;
}
.name {
text-align: center;
float: none;
}
#name-text {
width: 300px;
height: auto;
}
What i really want to try and do is just have the background on the class .top-section (either color or picture depending on what i go for) go behind the nav.
Im sure im just being a bit stupid here but i cant for the life of me see what im doing wrong, im still learning this so its quite new to me.
Thanks everyone