Centering the Main Menu

 

Question:

I would like to center my main menu or have it span across the entire page width.

 

Answer:

Very likely you will want to do a combination of the two Menu alignment options below.
Important: Please note that the CSS examples below only work if you are not using a Submenu.

 

Option 1) Span Menu across the entire width.

spread-out-menu

1) Log into WordPress
2) Click on “Appearance” -> “Editor”
3) A file called “style.css” should load by default. If not select it from the bottom of the file list on the right.
4) Type or copy/paste the following – you need to adjust the number in px depending on your needs and amount of menu items:
#access li {padding-left: 90px;}

 

Option 2) Center Menu

center-menu

1) Log into WordPress
2) Click on “Appearance” -> “Editor”
3) A file called “style.css” should load by default. If not select it from the bottom of the file list on the right.
4) Type or copy/paste the following – you need to adjust the number in px depending on your needs and amount of menu items:
#access ul {margin-left: 230px;}

 

backhome

Uncategorized

About Thomas

Lead Developer and Community Manager

Comments are closed.