Jump to content


CSS Horizontal menu


3 replies to this topic

#1 _*Misa_*

  • Guests

Posted 25 February 2008 - 05:17 AM

Hi people ... im having a problem ... <_< ... i am making a site for some bend !!!

I am trying to move my css horizontal menu in center of page under logo ,
and hi don't wanna move :angrylooking:

This is my code :

<html>
 <head>
 <style type="text/css">
 body {background-color: black}
 img.pos_left
 {
	 position: relative;
	 left: 320px
 }
  *{
 padding: 0;
 margin: 0;
 font-family: Arial, sans-serif;
 }
 body {
 margin: 20px;
 font-size: 12px;
 }
 ul {
 list-style: none;
 }
 
 ul a {
 color: red;
 text-decoration: none;
 display: block;
 padding: 5px 5px 5px 10px;
 width: 125px;
 background: #333;
 }
 
 ul a:hover {
 color: #4BD8FF;
 text-decoration: none;
 background: #3C3C3C;
 }
 ul li {
 border-bottom: 1px solid #fff;
 border-right: 1px solid #fff;
 float: right;
 position: relative;
 }
 </style>
 </head>
 <body>
 <img class="pos_left" src="logo1.jpg" />
 <ul>
 <li><a href="#">Home</a></li>
 <li><a href="#">Band</a></li>
 <li><a href="#">Discography</a></li>
 <li><a href="#">News</a></li>
 </ul>
 </body>
 </html>

Can anybody help me ??? please !!!

#2 VenomGraphics

    Young Padawan

  • Members
  • Pip
  • 131 posts
  • Gender:Male
  • Location:Tampa, FL

Posted 25 February 2008 - 02:25 PM

Hmm...perhaps place it into it's own DIV, and then just position the DIV itself where you want it?

#3 Bouzy210

    Jedi In Training

  • Members
  • PipPip
  • 434 posts
  • Gender:Male

Posted 05 March 2008 - 10:34 PM

Do you mean dead center? If thats what you want try this...

Margin: Auto;

#4 Jacorre

    P2L Jedi

  • Members
  • PipPipPip
  • 824 posts
  • Gender:Male
  • Location:USA
  • Interests:Computers, Technology, Internet, Graphic/Web Design, Music, Soccer

Posted 07 March 2008 - 04:12 PM

Yes create a div for the navigation and set the left and right margins to auto to center it. (Note: That won't work in older versions of IE).





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users