Community @ The Turning Gate

Support community for TTG plugins and products.

NOTICE

The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.

This forum is now closed, and exists here as a read-only archive.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#1 2016-09-22 18:32:32

ShawWellPete
Member
Registered: 2013-03-24
Posts: 173

Centre (or center) the menu in wordpress

Hey guys,

Is there a way of centering the menu in the wordpress theme? I can get the menu centered if I create it within Lightroom and create a new theme but it would be much easier to do it within Wordpress if it is possible.

www.begurvillas.com

Thanks

Offline

#2 2016-09-22 20:59:43

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Centre (or center) the menu in wordpress

Themes control such things. So all the design aspects are handled in the Lightroom plug-in.
Why not simply change your current theme in Lightroom and upload it, overwriting the existing one?


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#3 2016-09-22 21:37:53

ShawWellPete
Member
Registered: 2013-03-24
Posts: 173

Re: Centre (or center) the menu in wordpress

Hi Rod,

Thinking about it, the theme I use does have the menu aligned to the centre. But if I add menus from wordpress, it overwrites the menu  created in Lightroom and aligns it to the left.
It's much easier to change menus in wordpress than going back to Lightroom each time they need changing, is there an option somewhere or would I have to edit the theme?

Offline

#4 2016-09-22 22:46:02

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Centre (or center) the menu in wordpress

I guess I'm not following. You want to be able to change the Site Navigation menu in WordPress but when you do, the alignment changes from center alignment?


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#5 2016-09-23 17:37:41

ShawWellPete
Member
Registered: 2013-03-24
Posts: 173

Re: Centre (or center) the menu in wordpress

Yes, I set the them up from another site www.villabegur.com as I wanted a similar look. I applied that theme and got the menus that were created in Lightroom

Like this

original menus

However they are not the menus I would like for this site so I used Wordpress to create some new menus and ticked this box

WP

And the menus now look like this

new menus

Which is great apart from the fact that I would like them centered

Offline

#6 2016-09-24 00:01:50

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Centre (or center) the menu in wordpress

I think the issue is that WordPress menus uses unordered list items which are floated left by default. These would need custom css to center.
The site navigation exported with the theme doesn't use list items because you chose the "single level" navigation type.

Here's a post from the past that explains it more: http://community.theturninggate.net/vie … 035#p10035


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#7 2016-09-24 17:45:14

ShawWellPete
Member
Registered: 2013-03-24
Posts: 173

Re: Centre (or center) the menu in wordpress

Thanks rod but that link doesn't work?

Offline

#8 2016-09-24 22:24:06

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Centre (or center) the menu in wordpress

Try again, it works for me


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#9 2016-09-25 01:18:25

ShawWellPete
Member
Registered: 2013-03-24
Posts: 173

Re: Centre (or center) the menu in wordpress

Weird, I get this error...

Info
Bad request. The link you followed is incorrect or outdated.

Offline

#10 2016-09-28 18:14:21

ShawWellPete
Member
Registered: 2013-03-24
Posts: 173

Re: Centre (or center) the menu in wordpress

It seems like I need to add some script to edit css, I have google it but the code required depends on the theme so this, for example, doesn't work

.main-navigation ul {
text-align: center !important;
}

.main-navigation ul li {
display: inline-block !important;
float: none !important;
}

Any idea what code I would need for TTG CE4 theme?

Offline

#11 2016-09-28 21:22:33

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Centre (or center) the menu in wordpress

you can try

ul#nav
and
ul#nav li

maybe something like this: 

ul#nav {
    margin: 0 auto;
    width: 600px;
    }

ul#nav li {
    float: left;
    width: 150px;
    }

though you may need to get more specific. You can use the browser's inspector to probe the css.

You'll also need to give the ul a width

to add the code, use a custom css file via phplugins (easiest way)
http://ce4.theturninggate.net/docs/doku … custom_css

were you ever able to open this link: http://community.theturninggate.net/vie … 035#p10035


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

Board footer

Powered by FluxBB