Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-11-2008, 05:42 PM
biome.pat biome.pat is offline
 
Join Date: Aug 2008
Location: Toronto, ON, Canada
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Javascript menu issue

Hey all!
I'm trying to use the rollover.js script that is used so wonderfully on vBstyles.com, and I've had it working on one incarnation of my own style, but then when I did up a new header menu, I started getting this problem. The only thing I changed was that I slimmed down the banner (32 px height down to 18 px), and changed the links (no longer "usercp", "register", etc, but simpler custom ones instead).

So now when the pages load, the table that the menu exists in is 3 pixels too large, so it repeats a bit below. What's odd is that once I rollover all the buttons, the 3 pixels disappear and it goes back to how it should look. The only thing that fixes the problem is if I make the actual image height (in the IMG tag) 3 pixels smaller. The table then loads the right size, but onmouseover fades in the squashed image (3 px shorter). BAH! Why can't I learn these languages properly?!

Any help would be muchly appreciated!

Here's the relevant code in the "headerinclude" template:
HTML Code:
<script language="JavaScript" src="images/biome2_style/misc/rollovers.js" type="text/javascript"></script>

<script language="JavaScript" type="text/javascript">
<!--
JSFX.Rollover("basics",    "images/biome2_style/02/misc/basics_over.gif");
JSFX.Rollover("connections",    "images/biome2_style/02/misc/connections_over.gif");
JSFX.Rollover("contact",    "images/biome2_style/02/misc/contact_over.gif");

 
//-->
</script>
And here's the relevant code in the "header":
HTML Code:
<!-- nav buttons bar -->
<table height="18" cellpadding="0" cellspacing="0" border="0" width="100%" align="center" style="background-image:url(images/biome2_style/02/misc/nav_bg.gif)">
	<tr>
<!-- Basics -->
<td width="141">
	<table width="141"  border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td style="background:#FFFFFF url(images/biome2_style/02/misc/basics.gif);">
				<a href="blah"
					onmouseover="JSFX.fadeIn('basics')"
					onmouseout="JSFX.fadeOut('basics')"><img
					src="images/biome2_style/02/misc/basics.gif"
					name="basics"
					width="141"
					height="18" <!-- If I made this "15", it would load correctly, but mouseover wrong -->
					border="0"
					class="imgFader"
					id="basics"
					alt="" />
				</a>
			</td>

		</tr>
	</table>
</td>
<td width="2">
	<img src="images/biome2_style/02/misc/nav_space.gif" width="2" height="18" border="0" alt="" />
</td>
<!-- / Basics -->
<!-- Connections -->
<td width="194">
	<table width="194"  border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td style="background:#FFFFFF url(images/biome2_style/02/misc/connections.gif);">

				<a href="blah"
					nmouseover="JSFX.fadeIn('connections')"
					onmouseout="JSFX.fadeOut('connections')"><img
					src="images/biome2_style/02/misc/connections.gif"
					name="connections"
					width="194"
					height="18"
					border="0"
					class="imgFader"
					id="connections"
					alt="" />
				</a>
			</td>
		</tr>
	</table>
</td>
<td width="2">
	<img src="images/biome2_style/02/misc/nav_space.gif" width="2" height="18" border="0" alt="" />
</td>
<!-- / Connections -->
<!-- Contact -->

<td width="138">
	<table width="138"  border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td style="background:#FFFFFF url(images/biome2_style/02/misc/contact.gif);">
				<a href="blah"
					onmouseover="JSFX.fadeIn('contact')"
					onmouseout="JSFX.fadeOut('contact')"><img
					src="images/biome2_style/02/misc/contact.gif"
					name="contact"
					width="138"
					height="18"
					border="0"
					class="imgFader"
					id="contact"
					alt="" />
				</a>
			</td>
		</tr>
	</table>

</td>
<td width="2">
	<img src="images/biome2_style/02/misc/nav_space.gif" width="2" height="18" border="0" alt="" />
</td>
<!-- / Contact -->
	</tr>
</table>
<!-- / nav buttons bar -->
Oh, and the link is: http://biome.chass.utoronto.ca/forums2/
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07: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.05941 seconds
  • Memory Usage 2,215KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_html
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)showthread_list
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_threadedmode.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids_threaded
  • showthread_threaded_construct_link
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete