What is the best tag to create a menu bar

Asked

Viewed 327 times

0

Good evening guys, I’m beginner and so, I come to ask for help to create a menu bar

I’m setting up a site and have 2 horizontal bars, the first I want to put a bar, with a search button and another login/registration

Below are the navigation menus.

I usually create a tag and put a bg color on them to make a bar, and have extreme difficulty positioning it the way I want it to

Someone would tell me what to do to perfectly position this bar, plus a proper tags to create it?

Thanks a lot!

  • Take a look at this: MDN: Nav. On the rest, I suggest [Dit] the question and add a EMCV.

2 answers

1

you can use the tag Nav it represents a selection of links ex:

    <nav>
        <ul>
           <li><a href="#">test</a></li>
      </ul>
   </nav>

I didn’t quite understand your question, you want a tag to position your menu better?

0


you can make your menu this way horizontally

		*{margin: 0; padding: 0;}
		body{font-family: 'Roboto', sans-serif;}
		.menu{height: 60px; width: 100%; background-color: #f74343; display: table;}
		.menu ul{list-style: none;}
		.menu ul li{float: left;}
		.menu ul li a{text-decoration: none; color: #fff; padding: 20.8px; float: left; font-weight: lighter;}
		.menu ul li a:hover{background-color: #f77d7d; transition: 0.5s;}
<!DOCTYPE html>
<html>
<head>
	<title></title>
  <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
</head>
<body>
	<div class="menu">
		<nav>
			<ul>
				<li><a href="#">Página Inicial</a></li>
				<li><a href="#">Loja</a></li>
				<li><a href="#">Suporte</a></li>
			</ul>
		</nav>
	</div>
</body>
</html>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.