How to making horizontal line in css?

HTML CODE:

MRD
MRD FASHION
		</div>
	</div>

CSS CODE:
body{
background-image: url(Smoking.jpg);
}
.nav{
position: relative;
z-index: 2;
font-size: 17px;
background-color: #5f5f5f;
color: #f1f1f1;
width: 100%;
padding: 0;
letter-spacing: 1px;
font-family: “Segoe UI”,Arial,sans-serif;

}
.nav div{
display: inline-block;
position: absolute;
left: 0;
padding: 15px;
font-size: 20px;
color: white;
}
.nav ul{
margin: 0;
padding: 0;
width: 200px;
top: 0px;
background-color: #f1f1f1;
display: inline-block;
position: absolute;
margin: 0px;
padding: 0px;
right: 5px;
color: white;
width: 12.5%;
float: auto;
list-style: none;

}
.nav ul li a{
display: block;
padding: 8px 16px;
text-decoration: none;
color: white;

}

Use html <hr>. You can use CSS border properties to style it.

1 Like