The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
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???
|
#2
|
||||
|
||||
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? |
#3
|
||||
|
||||
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). |
#4
|
||||
|
||||
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? |
#5
|
||||
|
||||
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.
|
#6
|
||||
|
||||
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> </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! HTML Code:
#vbnav1r{ width: 30%; } |
#7
|
||||
|
||||
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). |
Благодарность от: | ||
Simon Lloyd |
#8
|
||||
|
||||
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?. |
#9
|
||||
|
||||
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.) |
#10
|
||||
|
||||
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? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|