Centre positioning

Post your questions and problem reports here.

Centre positioning

Postby realboyle » Mon Nov 19, 2012 12:11 pm

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 :-)
realboyle
 
Posts: 3
Joined: Mon Nov 19, 2012 12:02 pm

Re: Centre positioning

Postby Aivars » Mon Nov 19, 2012 12:22 pm

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
Blumentals Software Programmer
User avatar
Aivars
Blumentals Software Developer
 
Posts: 2453
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: Centre positioning

Postby realboyle » Mon Nov 19, 2012 12:27 pm

realboyle
 
Posts: 3
Joined: Mon Nov 19, 2012 12:02 pm

Re: Centre positioning

Postby Aivars » Mon Nov 19, 2012 12:57 pm

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.
Blumentals Software Programmer
User avatar
Aivars
Blumentals Software Developer
 
Posts: 2453
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: Centre positioning

Postby realboyle » Mon Nov 19, 2012 7:11 pm

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 !!
realboyle
 
Posts: 3
Joined: Mon Nov 19, 2012 12:02 pm

Re: Centre positioning

Postby Aivars » Tue Nov 20, 2012 8:21 pm

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.
Blumentals Software Programmer
User avatar
Aivars
Blumentals Software Developer
 
Posts: 2453
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: Centre positioning

Postby Ken » Sat Jul 13, 2013 4:17 pm

Aivars,

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

Ken
Ken
 
Posts: 2
Joined: Sat Jul 13, 2013 1:26 pm


Return to Easy Button & Menu Maker Support

Who is online

Users browsing this forum: No registered users and 11 guests