vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB5 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=264)
-   -   Auto-stretch Header Background (https://vborg.vbsupport.ru/showthread.php?t=305203)

Filt3r 11-30-2013 04:26 PM

Auto-stretch Header Background
 
Hi Everyone,

I have a header background that currently takes up 2/3 of the available space. I would like for it to automatically stretch to the entirety of the available space.

I was expecting to see an img src in the header template that I could set to have a width of 100% but I've not been able to find it.

Could someone help me find the easiest way to do this?

Thanks in advance

woodscooter 12-07-2013 09:53 PM

I have had some success with doing this. I'll describe what steps I took, and you may find that you can adapt it to match exactly what you want.

There's some template editing. I recommend you don't edit the default templates.

Start off with the image file you want for your banner. Mine was about 180px high and 850px wide. Use the style variable editor to edit Image Paths>titleimage, to tell the software what image to use for the banner.


Edit css-global.css. About line 656, within #header .site-logo, remove the line
Code:

max-width:320px;
About line 663, within # header .site-logo img, remove the line
Code:

max-width:320px;
Then add to css-additional.css,
Code:

#header .site-logo { position:relative; height:180px; width:850px; margin:auto;}
#header .site-logo img {position:absolute; width:850px; margin:auto;}

That's about it, really. I get a full-width banner if the page is narrow, and a centred banner with equal margins if the page is wide. It's not exactly what you are asking for, but it will take you a good way towards it.

billstelling 12-08-2013 04:34 AM

All of it can be done in additional css. It depends on the style and version of vB to do it that way. You can also set the parameters for it in the stylevars. It all depends on what you are more comfortable working with.


All times are GMT. The time now is 01:03 AM.

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.01161 seconds
  • Memory Usage 1,710KB
  • 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
  • (3)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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