Here is the structure of my HTML (at the top):
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<link href='https://fonts.googleapis.com/css?family=Montserrat' rel='stylesheet' type='text/css' />
<link href='https://fonts.googleapis.com/css?family=Nunito' rel='stylesheet' type='text/css' />
<link rel="stylesheet" href="stylesheet/main.css" />
<link rel="stylesheet" href="stylesheet/style.css" media="(min-width: 808px)" />
<link rel="stylesheet" href="stylesheet/mobile.css" media="(max-width: 807px)" type="text/css" />
<script src = "script.js"></script>
</head>
<body>
<div class = "nav">
<div class = "container">
<ul class="pull-left">
<li class = "content"><a href="">Home</a></li>
<li class = "content"><a href="/about">About</a></li>
<li class = "content"><a href="/projects">Projects</a></li>
<li class = "content"><a href="/recruit">Recruiting</a></li>
<li class = "content"><a href="/help">Help</a></li>
</ul>
<ul class="pull-right">
<li><a href = "index.html">Exatreo</a></li>
</ul>
</div>
<br />
<br />
<div class = "top_page">
<h1 class = "mainTitle">title</h1>
<p class = "slogan">Slogan</p>
</div>
</div>
Below is the CSS for the navigation in the style.css
file:
.nav li {
display: inline;
}
.nav a {
border-color: rgb(230, 230, 230);
border-style: solid;
-webkit-border-radius: 7px;
-moz-border-radius: 7px;
border-radius: 7px;
color: #e74c3c;
font-weight: bold;
padding: 14px 10px;
text-transform: uppercase;
}
.nav a:hover {
border-color: #e74c3c;
transition-duration: 0.5s;
}
.nav {
margin-bottom: 2%;
}
I am looking to implement a feature using HTML/jQuery/Javascript/CSS where if the screen width is less than 808px, then the .pull-left
list transforms into a button. When this button is clicked, the usual content should be displayed below.
Thank you for your help!