PDA

View Full Version : Equal space between menu items


Snakehill
02-07-2011, 08:57 PM
The title speaks for itself. I just can't figure out how to get an equal space between all menu items at http://magiciansthegathering.com (vB 3.8).

Any help would be very much appreciated! Thank you!

kh99
02-07-2011, 09:33 PM
Did you try <td width="17%"> for each item?

Snakehill
02-07-2011, 09:56 PM
I forgot to mention that when being a member, the menu contains 8 rather than 6 items. :erm:
Thank you for the help though.

kh99
02-07-2011, 10:28 PM
OK, what about

<if condition="$bbuserinfo[userid] == 0 AND ($td_width = '17%')"></if>
<if condition="$bbuserinfo[userid] != 0 AND ($td_width = '13%')"></if>

...

<td width="$td_width">

etc


It's ugly, but it's all on the server side and you don't have to make a plugin.

You could also do it with javascript if you prefer.

Someone else might have a better HTML or CSS based way to do it.

ETA: ...probably a less ugly way to do it would be to define a class differently for guest and members using an "if"

Snakehill
02-08-2011, 08:21 AM
Hmm.. the problem is that because one menu item is bigger than another.. there isn't an equal space between them when having them put in similar blocks. There is supposed to be as much black between "Control Panel" and "Community" as between "Media" and "Store". Any ideas? :erm:

Thanks a lot!

EDIT: I decided to go with padding-left/right on the TDs and to get rid of the navigation bar/table width to get everything centered. Still not exactly what I was looking for but at least it looks much better.

Thanks again for your help!

kh99
02-08-2011, 12:43 PM
Oh, sorry - equal space between items, not equal columns. You may have been able to do that by adding extra <TD></TD> between each column and maybe setting their widths so that they'd take up all the remaining space (or make them fixed width and put extras on the ends to take up any remaining).

In any case I guess you've got it solved. FWIW I think it looks fine the way it is.