Child li dorpdown is not covering width as parent li in navigation

Anybody can help me? Code: Thanks.


Asked by:- vikas_jk
: 2919 At:- 5/29/2017 12:11:14 PM

1 Answers
profileImage Answered by:- vikas_jk

Correct answer as per Sucia Bogdan


				<li><a href="#">Home</a></li>
				<li><a href="#">About us</a></li>
				<li><a href="#">Our products</a>
						<li><a href="#">Laptops</a></li>
						<li><a href="#">Smartphones</a></li>
						<li><a href="#">Tablets</a></li>
				<li><a href="#">Contact us</a></li>


nav ul {
	margin: 0;
	padding: 0;
	list-style-type: none;
	display: table;
	width: 100%;
	border-spacing: 12px;
	table-layout: fixed;

nav ul li {
	display: table-cell;
	background: rgb(0, 71, 115);
	text-align: center;
  position: relative;

nav ul li a {
	text-decoration: none;
	color: rgb(255, 255, 255);
	padding: 12px;
	display: block;

nav ul li ul {
	position: absolute;
	border-spacing: 0;
	width: 100%;

nav ul li ul li {
	margin-top: 1px;
	display: block;

Output will be as required

At:- 5/29/2017 12:28:20 PM

Login/Register to answer
Register directly by posting answer/details

Full Name *

Email *

By posting your answer you agree on privacy policy & terms of use

Subscribe Now

Subscribe to our weekly Newsletter & Keep getting latest article/questions in your inbox weekly