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

Reply
 
Thread Tools Display Modes
  #1  
Old 08-16-2012, 06:18 PM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Navbar css issues

Hi all, i have an issue within the navbar thats driving me nuts, i've added a <td> with an image in it but its pushing everything right!, the td is width 100%, the problem is it looks fine in forum home www.thecodecage.com/forumz and it has the issue in forumdisplay and showthread, how can i scale the <td> and the <img> so everything fits perfect, ive been working on it for a couple of days and can't get it right???
Reply With Quote
  #2  
Old 08-20-2012, 09:50 AM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've now set the image a s a background but it doesn't scale down and doesn't look right in Chrome...etc

Anyone any ideas?
Reply With Quote
  #3  
Old 08-20-2012, 03:31 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What is it that you want it to look like?

Also, you cannot have a <td> of width 100% when you have two other <td> in that row. That would mean the other two <td> tags are supposed to be 0% (which they won't do if they have content in them).
Reply With Quote
  #4  
Old 08-20-2012, 04:10 PM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Lynne, i've got rid of the td and now put it as background see here www.thecodecage.com/forumz/index.php?styleid=37 but it doesn't scale down with browser size or resolution so unless you have really widescreen it looks naff, ideally i want it where it is and to scale up and down automatically, its been driving me nuts!

--------------- Added [DATE]1345482662[/DATE] at [TIME]1345482662[/TIME] ---------------

Also, i tought having width 100% would allow it to scale automatically?
Reply With Quote
  #5  
Old 08-20-2012, 09:10 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You want to set the image width to 100% within a td tag set to a specific width (like %30), not the td width to 100%. An image that is used as a background image via css is not going to be scalable.
Reply With Quote
  #6  
Old 08-21-2012, 05:01 AM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Lynne, i've tried that and many other things, here's what i have
HTML Code:
<!-- breadcrumb, login, pm info -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
	 <td width="100%" class="alt1">
		<if condition="is_array($navbits)">
			<table cellpadding="0" cellspacing="0" border="0">
			<tr valign="bottom"> 
				<td><a href="#" onclick="history.back(1); return false;"><img src="$stylevar[imgdir_misc]/navbits_start.gif" alt="$vbphrase[go_back]" border="0" /></a></td>
				<td>&nbsp;</td>
				<td width="100%"><span class="navbar"><a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1">$vboptions[bbtitle]</a></span> $navbits[breadcrumb]</td>

			</tr>
			<tr>
				<td class="navbar" style="font-size:10pt; padding-top:1px" colspan="3">
<if condition="$_SERVER['REQUEST_METHOD'] == 'POST'">
<img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_finallink_$stylevar[textdirection].gif" alt="" border="0" />
<else /> 
<a href="$navbar_reloadurl"> 
<img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_finallink_$stylevar[textdirection].gif" alt="$vbphrase[reload_this_page]" border="0" /></a></if> 
<h1 class="h1"><strong>$navbits[lastelement]</strong></h1> 
			</tr></table>
		<else />
			<div class="navbar" style="font-size:10pt"><a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1">
<img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_start.gif" alt="" border="0" /></a> <strong>$vboptions[bbtitle]</strong></div> 

Page showing the last 10:-<div id="drop_box_nav">
<form action="#" onsubmit="return go_nav();">
'Some stuff
</form>
</div>
<script type="text/javascript" src="subnav.js"></script>
<td class="alt1" id="vbnav1r">
<img src="http://www.thecodecage.com/forumz/images/ccblue.png" style="width: 100;repeat: no-repeat;border: 0;" />
</td>
.............rest of navbar code!
But the image wont scale, just pushes everything out!, the id=vbnav1r is set in additional css and just has "Width: 30%;"
HTML Code:
#vbnav1r{
width: 30%;
}
Reply With Quote
  #7  
Old 08-21-2012, 03:20 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Get rid of the css. Then try what I am showing in this firebug screenshot (I set the widths in the other three tabs and then set the image width to 100%):


and then it expands/contracts as you change the browser width (see other screenshots).
Reply With Quote
Благодарность от:
Simon Lloyd
  #8  
Old 08-22-2012, 05:25 PM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Lynne, thanks very much for that, however could you give me a screenshot of the firebug settings expanded? what i mean is open the > arrows so i can see exactly which elements those sizes belong to

--------------- Added [DATE]1345665070[/DATE] at [TIME]1345665070[/TIME] ---------------

Also Lynne, with some of the changes i made (get rid of css, change width to 25% of previous <td>) in a different resolution 1024X768 (quite a lot of my visitors are corporate and have this setting) in showthread the navbar is pushed out to the right, however forumdisplay is fine?.
Reply With Quote
  #9  
Old 08-22-2012, 11:06 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It looks like you added the code to the correct place.

I believe it is getting messed up on the showthread pages because of the long breadcrumbs. I think if I were to do this, I would go back to the original navbar (3 columns) and then under the breadcrumbs in the first column, add a table with two columns. In the left column put all the original stuff (recommend this..., page showing the last 10...) and in the right I would put the image code. That will allow the breadcrumbs to expand however long they want and then give your logo room also. (You could also do it with colspan and rowspan but it's probably easier with a table.)
Reply With Quote
  #10  
Old 08-22-2012, 11:24 PM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Lynne, i'm working nights for the next 3 nights so i'll take a look then, one question though, wouldn't adding a table increase the size of the navbar height?, the whole reason for putting the logo where it is was to gain some screen real estate, having it in the standard place top left meant a scroll before seeing anything on the site, so i decided to freshen the look up and move the logo to the dead space there.

--------------- Added [DATE]1345681978[/DATE] at [TIME]1345681978[/TIME] ---------------

I've added the table showing secion1 section 2 and it would increase the height by logo height, or do i have it wrong?
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 01:11 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.04604 seconds
  • Memory Usage 2,295KB
  • Queries Executed 12 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_html
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (1)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (3)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (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_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
  • 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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete