vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Community Lounge (https://vborg.vbsupport.ru/forumdisplay.php?f=13)
-   -   Help (https://vborg.vbsupport.ru/showthread.php?t=115845)

cayote 05-17-2006 04:09 AM

Help
 
Anyone available for a quick question? I need to center a header graphic and it's got me flummoxed. Yeah I'm a newb

Adrian Schneider 05-17-2006 04:11 AM

<div align="center">{image}</div> should work

cayote 05-17-2006 04:23 AM

I think this is the code that is affecting it?:

Code:

<!-- logo -->
<a name="top"></a>
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
<tr>
        <td align="$stylevar[left]"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td>
        <td align="$stylevar[right]">
                &nbsp;
        </td>
</tr>
</table>
<!-- /logo -->

Not sure. Anyway my graphic is fine but it is left side and big blank on right..bah. Did a search of forums (several actually) and can't find any help...probably meaning it's so basic only a goofy newbie like me would ask how. [EDIT] when I change
Code:

<td align="$stylevar[left]">
to
Code:

<td align="$stylevar[right]">
it goes to the right but when I change it to center...it goes back to the left...any ideas?

SixteenOhNine 05-17-2006 04:47 AM

Simply replace the above with align="center". You can also drop the align="" altogether and replace it with style="text-align: center;" and it will work just the same :).

cayote 05-17-2006 04:59 AM

Quote:

Originally Posted by SixteenOhNine
Simply replace the above with align="center". You can also drop the align="" altogether and replace it with style="text-align: center;" and it will work just the same :).

Sorry for my stupidity, I'm not getting you... replace what? The whole TD statement?

SixteenOhNine 05-17-2006 05:14 AM

Replace the align="" with either align="center" or style="text-align: center;"

Freesteyelz 05-17-2006 05:33 AM

Quote:

Originally Posted by SixteenOhNine
Replace with style="text-align: center;"

Use this one whenever possible. :)

cayote 05-17-2006 06:10 AM

Quote:

Originally Posted by Freesteyelz
Use this one whenever possible. :)

Ok will try thanks...assuming that 'text' statement is gonna work with the graphic...let you know.

Nope that didn't work.

Freesteyelz 05-17-2006 06:30 AM

It should if you have only one <td> tag. Try replacing:

Code:

<!-- logo -->
<a name="top"></a>
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
<tr>
        <td align="$stylevar[left]"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td>
        <td align="$stylevar[right]">
                &nbsp;
        </td>
</tr>
</table>
<!-- /logo -->

With:

Code:

<!-- logo -->
<a name="top"></a>
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
<tr>
        <td style="text-align:center"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td>
</tr>
</table>
<!-- /logo -->


cayote 05-17-2006 06:37 AM

Ahhhh....I see, that makes sense...I'll try that and let you know...thanks!

That did it!!! Thanks a bunch guys! I love this place...support from the user community is awesome! Thanks again! :banana:

Freesteyelz 05-17-2006 06:51 AM

Props to teamwork gang! :)

cayote 05-17-2006 06:57 AM

Yeah that was great...no offense to anyone but the final instructions made sense when I looked at them. Dunno what all the rigomorale was about in the header I have (custom, I'm sure something will crash later hahaha) but the changing everything to one function made sense to me. Learning as I go!

Freesteyelz 05-17-2006 07:02 AM

A lot of us learn that way too. :)

cayote 05-17-2006 07:04 AM

It's amazing how that cleaned up the look of my page...now if I could stretch it....arg...heheheh I guess that's just a matter of the graphic dimensions?

Freesteyelz 05-17-2006 07:11 AM

Yes but you can always stretch the image. If your using the <img> tag then set the width in the tag. Something like:

Code:

<img src="image_URL_here.gif/jpg" width="700px" class="img" />
Then in Main CSS (Additional CSS Definitions):
Code:

img {
  border:0;
  }

It will distort your image, however, if it's stretched forcefully.

cayote 05-17-2006 07:21 AM

Quote:

Originally Posted by Freesteyelz
Yes but you can always stretch the image. If your using the <img> tag then set the width in the tag. Something like:

Code:

<img src="image_URL_here.gif/jpg" width="700px" class="img" />
Then in Main CSS (Additional CSS Definitions):
Code:

img {
  border:0;
  }

It will distort your image, however, if it's stretched forcefully.


Ok but how does that work with what you told me above?

Code:

<!-- logo -->
<a name="top"></a>
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
<tr>
        <td style="text-align:center"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td>
</tr>
</table>
<!-- /logo -->

I replace
Code:

<img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" />
with what you said? I don't get that as they appear to be completely different statements. Oh wait..the CSS call covers the border statement..but what about the $stylevar[titleimage] and alt="$vboptions[bbtitle] stuff...?

Freesteyelz 05-17-2006 07:34 AM

It should be:

Code:

<img src="$stylevar[titleimage]" width="700px" border="0" alt="$vboptions[bbtitle]" />
Where it says "700px" change to the width you want it stretched to.

The border="0" should not be inside the <img> tag (bad coding) but that's for another time (shame on vB). Heh.

cayote 05-17-2006 07:40 AM

Ahh...again that makes sense.. :)

[Edit] Ok that works but goofs the graphic..so's I guess I redo it. Oddly it also Widened it? PS...if you are online Free...any chance of live chat? I have a TS we can use. Err..[Edit] How do I just use the graphic as is..ie it's dimensions? [Edit again] Nevermind...using the width setting along with the newly made graphic worked fine...thanks! [Re edit] Ok...hehe another one...the whole page scales with the browser...except the graphic...yikes! [Double trouble edit] Ok...replacing width with $stylevar[outertablewidth] allows the graphic to scale with the browser but the initial graphic doesn't fit the window...? Learning as I go. Making a new image (larger) didn't work as far as sizing? Hmmm. Hope others are reading this and learning too! :)

Freesteyelz 05-18-2006 12:21 AM

Hehe. Self-service is fantastic. :)


All times are GMT. The time now is 04:55 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.01151 seconds
  • Memory Usage 1,763KB
  • 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
  • (12)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (19)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