templemedia
Posts: 34
|
| Posted: 03/03/2008, 4:16 AM |
|
Hi All
I have a menu page that contains a horizontal menu produced with CCS4's menubuilder. The menu defaults to left alignment and i want to center it. I have played about with the style sheets but can't get it to center.
Could anyone point me in the right direction to achieve this?
Thanks and regards
Richard
|
 |
 |
magus
Posts: 98
|
| Posted: 03/03/2008, 12:52 PM |
|
Hi Richard,
Have you tried enclosing the menu in a div and centering that?
Don A
|
 |
 |
DonB
|
| Posted: 03/03/2008, 4:41 PM |
|
The universal problem with floated elements. I've seen solutions, but they
require javascript. If you can live with the inconvenience, the div
container that Magus suggests will work, but you have to define the width of
it in advance and then do something like apply the margin:auto style to it,
or assign an explicit margin size.
You'll spend a lot of time trying and probably end up with it never being
really, quite, centered. "CSS center floating elements" will get you lots
of ideas if you insist on going that route. I'd recommend staying with the
left float (or a right float) and perhaps stuff something else into the
other side (using opposite float direction on that element) to give a sense
of balance to the layout.
--
DonB
"templemedia" <templemedia@forum.codecharge> wrote in message
news:547cbec32cc1e3@news.codecharge.com...
> Hi All
>
> I have a menu page that contains a horizontal menu produced with CCS4's
> menubuilder. The menu defaults to left alignment and i want to center it.
> I have
> played about with the style sheets but can't get it to center.
>
> Could anyone point me in the right direction to achieve this?
>
> Thanks and regards
>
> Richard
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.yessoftware.com/
>
|
|
|
 |
templemedia
Posts: 34
|
| Posted: 03/04/2008, 1:43 AM |
|
Thanks for you help guys.
Richard
|
 |
 |
|