Log in

View Full Version : Resolved centering top nav



theremotedr
02-23-2016, 05:17 PM
Here is the page http://www.theremotedoctor.co.uk/index.html

I am trying to center the header options "Home page, How to use this site" etc etc withing the border it lives in.
The original look was positioned to the right with float.
Ive removed the float and replaced it with the code below.

padding:5px 0px 0px 0px;

The reason for doing this was because the ipad would show the header options on 2 lines & i would like then on 1 line.
Now having all of the on 1 line i just need to center them to the border.

text-align:center; did not work for me.

styxlawyer
02-23-2016, 07:50 PM
try:



margin: 0 auto;

theremotedr
02-23-2016, 08:53 PM
Hi,
Have you tried that out in Firebig F12 etc ?
I thought I tried that but no luck.
Will look again tomorrow.

Cheers.

theremotedr
02-24-2016, 07:27 AM
Hi,
Yes i did try that code but no change.


margin: 0 auto;

Did it change for you when in F12

theremotedr
02-24-2016, 07:49 AM
All sorted now.

Changing the following allowed it to center

#menu-main-navigation{display:block; TO #menu-main-navigation{display:inline-block;}}