Mobile Friendly Website


Doing it with style

centering menus COMMENTS

Welcome to my Comments Pages

Please note. I get a few hundred emails a week from visitors asking for help, or posing questions on how to modify my demos to suit their application and I read them all. Unfortunately I only have a limited amount of time to spend answering these questions.

So if I do not reply, please do not be offended, and if I do reply then you are one of the lucky ones.

If you are asking for permission to use any of my demonstration then please email me with your request stu{at}

Post a comment

Current posts

I've used an alternative method which achieves the same effect here:

The basic menu design came from
(21.01.2007, 11:06)

Fredrik Carlbom:-
A nice solution, I would recommend changing <del> into <span> though, looks better if you ask me and avoids th usage of some css...

I'm using spans with display: inline-block into my menu I'm building, thanks for the idea!
(21.06.2007, 00:16)

Alex C:-
Just so you know, I had the darnedist time getting the centered menu to work in IE6 and FF like it is on your site.

Turns out, the IE hacks shown on the page (i.e. * html ...) don't work. The ones you used (i.e. [if IE] conditional) do work. You might want to update the snippet to reflect that.
(25.06.2007, 21:52)

I couldn't get it to work until I set <body> to text-align: center.
(24.10.2007, 11:23)

Hi Stu,

I've discovered an alternative, but above all a valid technique for the <del>-Tag ;)

<!--[if lte IE 7]><table class="container"><tr><td><![endif]-->
<ul id="menu2">
<!--[if lte IE 7]></td></tr></table><![endif]-->

cu Maik
(29.06.2008, 10:21)

The second menu doesn't work properly in IE7, floats don't work. Fix is:

* html #menu2 li, *+html #menu2 li {
float: left;
(13.10.2008, 19:59)

Richard Young:-
I'm trying to include a drop down sub menu also using lists (li ul li). I have it working but when I included your suggestion to get the main menu centered, it stopped the sub menu from working.
Do you have suggestions how I can get it to work.
(20.04.2011, 11:26)

Richard Young:-
This is being caused by the overflow: hidden but I need that to get rid of the horizontal scroll bar.
(20.04.2011, 12:36)

Thx a lot, I needed this so my list was centered in IE as well.
(03.05.2012, 09:53)

awesome, thanks
(25.07.2012, 22:05)

10 of 28 comments (part 1). [ » ] [ * ]


Your comment:

Your Name:

Stu's First Name - 3 letters (required)

Thanks to Alex for this script.

Please enter your comments for this site page.
Please note that all posts are moderated.

Posting rules

HTML is turned off
Maximum word length is 80 characters.
Messages limited to 1200 characters.
Web links should not include 'http://'


Your donations keep CSS PLAY running.
If your donation is for the use of a demo then please email me with the demo url after making your donation.


Facebook Twitter rss feed Facebook Fan Page