7
I’m having many difficulties to align the text from my menu to the center, I’m now starting to learn how to develop websites.
The code is like this:
<center>
<h1>Meu Site</h1>
<div id="menu">
<ul>
<li><a href="">Home</a></li>
<li><a href="">Informações</a></li>
<li><a href="">Novidades</a></li>
<li><a href="">Contato</a></li>
<li><a href="">Staff</a></li>
</ul>
</div>
</center>
css
:
h1 {
color:#00C
}
body {
padding:0px;
margin:auto;
max-width: auto;
}
#menu ul {
padding:0px;
margin: 0 auto;
float: left;
width: 100%;
background-color:#999;
list-style:none;
font:80% Tahoma;
alignment-adjust:central;
max-width: auto;
}
#menu ul li {
display: inline;
width: 520px;
}
#menu ul li a {
background-color:999;
color: #333;
text-decoration: none;
border-bottom:3px solid #EDEDED;
padding: 2px 10px;
float:left;
}
#menu ul li a:hover {
background-color:#D6D6D6;
color: #6D6D6D;
border-bottom:3px solid #EA0000;
}
Since you’re starting now, why don’t you use the Botstrap:http://getbootstrap.com/? framework It’ll look a lot better.
– Marconi
Because I know a little bit about HTML and CSS because I took a course a long time ago and I’m coming back now with many difficulties. I need to solve this problem to proceed.
– Jesimiel
You are right @Jesimiel, first use
<center>
is something that for me, only weighs the code, besides being unnecessary because everything can and should be aligned bycss
– João Victor Gomes Moreira