Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Design and Graphics Discussions
  #1  
Old 12-21-2010, 02:51 PM
gregmlb gregmlb is offline
 
Join Date: Dec 2007
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Adding Rollover Images underneath Titleimage

Could one of the vB4 wizards here please coach me? I am converting a vb3.8.6 forum over to vB4.1.0PL2, and am attempting to work my way through the various cosmetic issues. TheLastSuperMan was extremely helpful with columnizing my forum ? so that part is done. What I need to do next is add a number of rollover images (each being a link), along with some javascript (google ad) underneath the titleimage, and above the navbar.

Here is a screenshot that shows what my next goal is ? the top image is from my working 3.8.6 forum, and the bottom image is a current snapshot of the 4.1.0PL2 version (which is running as a test forum in a password-protected directory on a different domain of mine):



You can see the working 3.8.6 version of the forum here, if you wish:
http://www.midlifebachelor.com/forum...isplay.php?f=2

FIRST ? THE ROW OF ROLLOVER IMAGES (AT TOP)
I?m not working on the "woman of the month" rollover nor the google ad just yet ? first I'm focusing just on the row of rollover images (each a link) at the top (underneath the titleimage) ... which look like "buttons" for home, news, etc. I've tried to get this working two different ways ? and I'm not quite there yet. Being new to CSS, I'm positive this is where my issue is. Here are the two ways I've tried thus far:

1) Tried creating a float left "row" where the images appear next to each other. Problem with this approach is that if the user narrows the window, the link images wraparound underneath (and I don't want them to ? I need them to stay fixed). Have tried using clear right, clear left, clear both ? and it doesn't seem to work, so maybe I'm doing something wrong.

2) Tried using absolute positioning ? and I would think that would work, but it seems to want to place the link images on top of one other (when they should be next to one another).

In all cases, javascript controls the animation of these link images ? which pre-loads two different images for each link when the page loads, and also flashes a second image when a mouseover event occurs (plus some other stuff).

Here are descriptions with screenshots and code of what I see, and where I need the coaching:

FLOAT LEFT ROW APPROACH
Here is what it looks like using the "float left row approach":

Perfect when the browser window is wider than the titleimage and all of the rollover links:



but when the browser is narrowed, then the rollover link images wraparound underneath (which I do not want), plus it moves the "Forum" and "What?s New?" navbar links to the right (also not wanted), as shown here:



Here is the code associated with the above "float left row approach" as I?m calling it:

Added to additional.css
Code:
div.linkrow {
height:auto;
width:1019;
float:left;
}

div.linkrow linkrow {
display:inline;
overflow:hidden;
clear:right;
}
Note that changing clear:right to clear:left or clear:both does not fix this. Also note that I did not include the javascript function source in the above ? just to keep things simple here, but it appears in the header template, just above the linkrow divs.

Bottom of header template:

Code:
<div class="linkrow">
<a href="../index.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Home','','../images/buttons/mlb_home_on.png',1)"><img src="../images/buttons/mlb_home.png" alt="Home" name="Home" width="54" height="35" border="0" id="Home" /></a>
</div>

<div class="linkrow">
<a href="../news.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('News','','../images/buttons/mlb_news_on.png',1)"><img src="../images/buttons/mlb_news.png" alt="News" name="News" width="54" height="35" border="0" id="News" /></a>
</div>

<div class="linkrow">
<a href="../datingadvice.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Midlife Dating Advice','','../images/buttons/mlb_mldatingadvice_on.png',1)"><img src="../images/buttons/mlb_mldatingadvice.png" alt="Midlife Dating Advice" name="Midlife Dating Advice" width="108" height="35" border="0" id="Midlife Dating Advice" /></a>
</div>

<div class="linkrow">
<a href="../article.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Short Midlife Articles','','../images/buttons/mlb_articles_on.png',1)"><img src="../images/buttons/mlb_articles.png" alt="Short Midlife Articles" name="Short Midlife Articles" width="108" height="35" border="0" id="Short Midlife Articles" /></a>
</div>

<div class="linkrow">
<a href="../askmlb/askmlb.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Ask Midlife Bachelor','','../images/buttons/mlb_ask_mlb_on.png',1)"><img src="../images/buttons/mlb_ask_mlb.png" alt="Ask Midlife Bachelor" name="Ask Midlife Bachelor" width="114" height="35" border="0" id="Ask Midlife Bachelor" /></a>
</div>

<div class="linkrow">
<a href="../crisis/crisis-intro.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Your Midlife Crisis','','../images/buttons/mlb_mlcrisis_on.png',1)"><img src="../images/buttons/mlb_mlcrisis.png" alt="Your Midlife Crisis" name="Your Midlife Crisis" width="102" height="35" border="0" id="Your Midlife Crisis" /></a>
</div>

<div class="linkrow">
<a href="../health.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Midlife Health Challenges','','../images/buttons/mlb_health_on.png',1)"><img src="../images/buttons/mlb_health.png" alt="Midlife Health Challenges" name="Midlife Health Challenges" width="108" height="35" border="0" id="Midlife Health Challenges" /></a>
</div>

<div class="linkrow">
<a href="../polls.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Midlife Bachelor Polls','','../images/buttons/mlb_polls_on.png',1)"><img src="../images/buttons/mlb_polls.png" alt="Midlife Bachelor Polls" name="Midlife Bachelor Polls" width="59" height="35" border="0" id="Midlife Bachelor Polls" /></a>
</div>

<div class="linkrow">
<a href="../forums" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Midlife Bachelor Discussion Forums','','../images/buttons/mlb_forums_on.png',1)"><img src="../images/buttons/mlb_forums.png" alt="Midlife Bachelor Discussion Forums" name="Midlife Bachelor Discussion Forums" width="103" height="35" border="0" id="Midlife Bachelor Discussion Forums" /></a>
</div>

<div class="linkrow">
<a href="../feedback.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Reader Feedback','','../images/buttons/mlb_feedback_on.png',1)"><img src="../images/buttons/mlb_feedback.png" alt="Reader Feedback" name="Reader Feedback" width="108" height="35" border="0" id="Reader Feedback" /></a>
</div>

<div class="linkrow">
<a href="../contact.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Contact Midlife Bachelor','','../images/buttons/mlb_contactmlb_on.png',1)"><img src="../images/buttons/mlb_contactmlb.png" alt="Contact Midlife Bachelor" name="Contact Midlife Bachelor" width="99" height="35" border="0" id="Contact Midlife Bachelor" /></a>
</div>

<br /><br />

ABSOLUTE POSITIONING APPROACH
And here is what happens when I try absolute positioning:



Here is the code from my stab at absolute positioning ?

additional.css
Code:
homelink {
postion:absolute;
width:54; 
height:35;
top: 70;
left:0;
}

newslink {
postion:absolute;
width:54; 
height:35;
top: 70;
left:55;
}
bottom of header template
Code:
<div class="homelink">
<a href="../index.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Home','','../images/buttons/mlb_home_on.png',1)"><img src="../images/buttons/mlb_home.png" alt="Home" name="Home" width="54" height="35" border="0" id="Home" /></a>
</div>

<div class="newslink">
<a href="../news.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('News','','../images/buttons/mlb_news_on.png',1)"><img src="../images/buttons/mlb_news.png" alt="News" name="News" width="54" height="35" border="0" id="News" /></a>
</div>
Note that I did not include the javascript function source in the above ? just to keep things simple here, but it appears in the header template, just above the homelink and newslink divs.

Which of the two above approaches should I use for the row of links/rollover images? Can you tell me if you see anything obvious that I'm missing that would make one of the above approaches work? Seems like the "float left row approach" would be the better one to pursue ? but I cannot seem to stop the wraparound. Any suggestions on how to fix this would be greatly appreciated ? thanks!
Reply With Quote
Reply

Thread Tools
Display Modes

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 12:14 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04235 seconds
  • Memory Usage 2,234KB
  • 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
  • (4)bbcode_code
  • (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