Jump to content

Center Dropdown list sublinks


annyvz
 Share

Recommended Posts

Hi

 

I am trying to get my sub links on my dropdown list to display center:

 

my first link {Exam Info} centers fine (image 1) however my second link {Download} does not want to center (image 2)

 

Please could anyone assist me in sorting this out.

 

Code attached

 

Thank you!

 

 

post-175273-0-37131000-1406727124_thumb.jpg

post-175273-0-01190600-1406727125_thumb.jpg

center.html

Link to comment
Share on other sites

  • 2 weeks later...

It would be helpful to show the relevant code. The HTML document you provided doesn't actually have your drowdown menues working so it's dificult to test.

 

Anyway, the first image isn't centered either. It just so happens that all of your sub links take up all of the allowed space and make it appear that it's centered. I think the problem is this:

#nav ul li{float:left;}

All of your nav links are floating to the left. Something like this might help? Not sure

#nav ul li ul{margin:0 auto;}#nav ul li ul li{float:none;display: inline;}
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...