Hello,
I’m making a website with HTML and CSS and I need to align the menu bar text to the right hand side. However, I have added text-align: right; but it’s not doing anything. Could someone please help me out with this? Thank you. Here is my code:
<!DOCTYPE html>
<html><html lang="en">
<head>
<meta charset="UTF-8">
<style>
ul {
list-style-type: none;
margin: 0;
padding: 0;
}
.menubar
{
background-color: #333;
overflow: hidden;
}
.menubar a
{
float: left;
color: #ffffff;
text-align: right;
padding: 30px 30px;
text-decoration: none;
font-size: 20px;
}
</style>
<body>
<div class="header">
<h1 style="color:#ffffff;"><center>Crystal Pendants</center></h1>
<body style="background-color:#6495ED">
</body>
<body>
<div class="menubar">
<ul>
<li><a href="default.asp">Home</a></li>
<li><a href="products.asp">Products</a></li>
<li><a href="contact.asp">Contact</a></li>
<li><a href="about.asp">About</a></li>
</ul>
</div>
</body>
</head>