Reply to topic  [ 5 posts ] 
CSS menus 
Author Message
Spends far too much time on here
User avatar

Joined: Fri Apr 24, 2009 8:38 am
Posts: 2967
Location: Dorchester, Dorset
Reply with quote
Be gentle with me here, I'm just starting out with this!

I'm trying to create a menu using css. Is it possible to centre a list? It seems that the alignment tools take the bullet into account, even though I've set the list-style-type to none. At the moment, I've just done it by eye using left padding and extending the width of my menu block. I've been doing a lot of searching and I can't seem to find anything that tells me how to do it, but nor can I find anything that says it can't be done. Is it worth carrying on looking for a solution?

Should I be doing it as a list even? Only all the examples I can find seem to have their menus as lists.

Hope that makes sense.

_________________
I've finally invented something that works!

A Mac User.


Thu Jun 11, 2009 3:40 pm
Profile
Spends far too much time on here
User avatar

Joined: Thu Apr 23, 2009 6:44 pm
Posts: 4141
Location: Exeter
Reply with quote
Yes, menus as lists is definitely the way forward. Most of the stuff I've done has been using this for creating rollovers, and I've never had any issues with positioning:

http://www.alistapart.com/articles/horizdropdowns/

Personally, I wouldn't centre a menu, it tends to look untidy (to me anyway).

_________________
"The woman is a riddle inside a mystery wrapped in an enigma I've had sex with."


Fri Jun 12, 2009 6:46 am
Profile WWW
Spends far too much time on here
User avatar

Joined: Fri Apr 24, 2009 8:38 am
Posts: 2967
Location: Dorchester, Dorset
Reply with quote
Thanks Jon, I'll have a look at that. I've managed to get it to work how I want as paragraphs, but I ought to try and do it 'properly'! It's a bit frustrating as I could do what I want so much more easily using html and tables, but I'm determined to give this css stuff a go!

_________________
I've finally invented something that works!

A Mac User.


Fri Jun 12, 2009 9:20 am
Profile
Spends far too much time on here
User avatar

Joined: Thu Apr 23, 2009 11:36 pm
Posts: 3527
Location: Portsmouth
Reply with quote
Why can't you just use text-align: center; on the <a></a> element?? That won't include any space for a bullet.

_________________
Image


Wed Jun 17, 2009 4:39 pm
Profile
Spends far too much time on here
User avatar

Joined: Fri Apr 24, 2009 8:38 am
Posts: 2967
Location: Dorchester, Dorset
Reply with quote
Nick wrote:
Why can't you just use text-align: center; on the <a></a> element?? That won't include any space for a bullet.


Ah, didn't think of that! I've managed to achieve what I wanted as a paragraph anyway, so I can't remember what stage I was at when I asked the question. I'll bear it in mind for next time though, cheers.

_________________
I've finally invented something that works!

A Mac User.


Thu Jun 18, 2009 2:33 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.