vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Equal space between menu items (https://vborg.vbsupport.ru/showthread.php?t=258519)

Snakehill 02-07-2011 08:57 PM

Equal space between menu items
 
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

Code:

<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.


All times are GMT. The time now is 05:12 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01685 seconds
  • Memory Usage 1,719KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete