Jump to content

Help: Positioning <ul><li> in CSS not working


stykface

Recommended Posts

1st post here. This is a great forum you guys have here.

 

Just have a quick question that I've been racking my brain over for about 3 hours now. Here's the page and stylesheet I'm testing out:

 

http://www.venturemech.com/index_test.php

http://www.venturemech.com/venturemech_test.css

(the actual web address can be found here: http://www.venturemech.com/ )

 

I'm wanting to convert my company's site from the embedded flash header/navigation to actual HTML and I have re-created the new nav menu using the traditional ul li html elements. I cannot seem to center or even align-left the whole ul, and have been doing some diagnosing for awhile now. Can anyone point me in the right direction? Thanks in advance for all your help.

 

A little background.... I know HTML pretty well since I've always made simple static sites for myself and others, and I hand code everything. I'm an AutoCAD designer at my company but I've made small changes to our site from time to time and they asked if I wanted to just take it over completely to satisfy their wants of an "in house" web designer. So this is why I'm wanting to change things over so I can easily edit the nav menu, etc, when we have updates.

 

Anyways, thanks again for all who can help. I have been stuck on this for awhile, guess I don't know CSS as much as I thought.  8)

Link to comment
Share on other sites

What you are trying to do isn't the easiest thing, and it's not the most intuitive thing either. Here is a link that will tell you how to do what you want to do:

 

http://www.pmob.co.uk/pob/centred-float.htm

 

Haku, Thanks for you help. I never knew of approaching a centered float in that way, but I will take your advice (as well as the advice from the page you linked) and look for an alternative style formatting. After testing the method you linked me to, I found out that my problem still exists so I will dive into the code more and try to figure it out. Once again, thanks for the help. Much appreciated.  ;)

Link to comment
Share on other sites

Take a look at cssplay.com - Stu Nichols has a few drop down menu samples, like the following:

 

http://www.cssplay.co.uk/menus/pro-droplistv2.html

 

Oh nice!! Thanks for the link. I will check out his code.

 

Also an update... I figured out the centering problem I was having. I asked a friend of mine who's good at CSS and he said to use margin:0 auto; display:block; for centering something. Thanks again guys, very helpful indeed.  ;)

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.