Page 1 of 1

Centre positioning

PostPosted: Mon Nov 19, 2012 12:11 pm
by realboyle
My newly created Easy Buttons Menu looks great, BUT shows on the left of my web page.
What should I do to position the menu on the centre of my web page??
... sorry if this question has been answered previously :-)

Re: Centre positioning

PostPosted: Mon Nov 19, 2012 12:22 pm
by Aivars
The easiest way to do it is to insert the menu inside an element such as div and center this element.
Some tips on how to do it: http://www.w3schools.com/css/css_align.asp

Re: Centre positioning

PostPosted: Mon Nov 19, 2012 12:27 pm
by realboyle

Re: Centre positioning

PostPosted: Mon Nov 19, 2012 12:57 pm
by Aivars
Change

Code: Select all
<ul id="mb79xhebul_table" class="mb79xhebul_menulist css_menu" style="width: 586px; height: 42px;">


to

Code: Select all
<ul id="mb79xhebul_table" class="mb79xhebul_menulist css_menu" style="width: 586px; height: 42px; margin-right: auto; margin-left: auto; display: block;">


and that will center your menu.

Re: Centre positioning

PostPosted: Mon Nov 19, 2012 7:11 pm
by realboyle
Thank You Aivars, but it does not work in IE Explorer 9
Sorry for troubling you again ...
It is great in Chrome, Firefox and Safari, but NOT in IE Explorer !!

Re: Centre positioning

PostPosted: Tue Nov 20, 2012 8:21 pm
by Aivars
Didn't notice the page uses quirks mode... You can center the menu by inserting it inside center-aligned DIV like this:
Code: Select all
<div align="center">
  <ul ....
  ...
  </ul>
</div>


Remove the margins and everything you added before.

Note that nobody uses align attribute nowadays but since you're using quirks mode and you're using align attribute in the code anyway, this will center the menu.

Re: Centre positioning

PostPosted: Sat Jul 13, 2013 4:17 pm
by Ken
Aivars,

Thank you, thank you, thank you !!!! Works great :D

Ken