create dynamic navigation menu css

Solutions on MaxInterview for create dynamic navigation menu css by the best coders in the world

showing results for - "create dynamic navigation menu css"
Axel
28 May 2019
1<!DOCTYPE html>
2<html>
3<head>
4<meta name="viewport" content="width=device-width, initial-scale=1">
5<style>
6body {
7  margin: 0;
8  font-family: Arial, Helvetica, sans-serif;
9}
10
11.topnav {
12  overflow: hidden;
13  background-color: #333;
14}
15
16.topnav a {
17  float: left;
18  color: #f2f2f2;
19  text-align: center;
20  padding: 14px 16px;
21  text-decoration: none;
22  font-size: 17px;
23}
24
25.topnav a:hover {
26  background-color: #ddd;
27  color: black;
28}
29
30.topnav a.active {
31  background-color: #4CAF50;
32  color: white;
33}
34</style>
35</head>
36<body>
37
38<div class="topnav">
39  <a class="active" href="#home">Home</a>
40  <a href="#news">News</a>
41  <a href="#contact">Contact</a>
42  <a href="#about">About</a>
43</div>
44
45<div style="padding-left:16px">
46  <h2>Top Navigation Example</h2>
47  <p>Some content..</p>
48</div>
49
50</body>
51</html>