Jump to content

[SOLVED] Trouble positioning menu


Eiolon

Recommended Posts

New to CSS so bear with me.

 

I am trying to position my menu 5 pixels down from the top and 5 pixels from the left.  Here is my code (which is probably totally off, mind you):

 

html,body {
background-color: #FFF;
margin: 0px;
}

#navigation a {
position: absolute:
top: 5px;
left: 5px;
color: #FFF;
background: #2C3B42;
font-family: Arial, Helvetica, sans-serif;
font-size: 16px;
font-weight: bold;
text-decoration: none;
padding: 5px;
margin: 2px;
}

#navigation ul {
list-style: none;
}

#navigation li {
float: left;
} 

 

The menu:

 

<ul id="navigation">
<li><a href="#"><span>Home</span></a></li>
<li><a href="#"><span>Finance</span></a></li>
<li><a href="#"><span>Resources</span></a></li>
<li><a href="#"><span>Contacts</span></a></li>
</ul>

 

The problem is each item is layered on top of each other.  If I change the position to relative, it does not layer them but it does not position the menu 5px from the top and 5px from the left.

 

Any suggestions?  Thanks!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.