i cant center my stuff using css

Status
Not open for further replies.

habbz

Custom Title bitchssssssss
Nov 12, 2010
227
1
i cant center my navi bar at the top left using css
You must be registered for see images attach

can some one tell me how to?
im just starting to learn css

my failure of css:
Code:
<html>
<head>
<style type="text/css">
.center
{
text-align:center;
}
body
{
background-image:url('gradient2.png');
background-repeat:repeat-x;
}
ul
{
list-style-type:none;
margin-left: auto;
margin-right: auto;
padding:0;
overflow:hidden;
}
li
{
float:left;
margin-left: auto;
margin-right: auto;
}
a
{
display:block;
width:60px;
background-color:#dddddd;
}
</style>
</head>

<body>
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#news">News</a></li>
<li><a href="#contact">Contact</a></li>
<li><a href="#about">About</a></li>
</ul>
<h1 class="center">Hello!</h1>
<p class="center">i like this background!</p> 
</body>
</html>
 

habbz

Custom Title bitchssssssss
Nov 12, 2010
227
1
@m0nsta: im not making a link im making a navigation bar but it wont center
@ry: i dont get what your saying?
 
Status
Not open for further replies.

Users who are viewing this thread

Top