Go Back   vb.org Archive > vBulletin 5 Connect Discussion > vB5 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 05-27-2017, 02:49 PM
SteveAngelis SteveAngelis is offline
 
Join Date: Nov 2009
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Top Banner Scaling

Hello All,

Where would you go to adjust the scaling of the banner at the top of the page, mainly the background banner at the top? I have not seen a spot in the header to make this change.

In short, when the resolution of the screen or the size of the browsing window changes, the image squishes in and the size of it changes with the window size. As such, it makes the proportions look off. Is there a place that I can change this?
Reply With Quote
  #2  
Old 05-28-2017, 12:50 AM
In Omnibus's Avatar
In Omnibus In Omnibus is offline
 
Join Date: Apr 2010
Location: Inside A Blade Server
Posts: 840
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If the logo (banner) is designed for the largest screen resolution it shouldn't lose proportion when the media queries cause the site to be responsive on smaller screens.

There is no setting that will allow you to modify the resolution of the logo image.

Without more information, the only thing I can guess is that your logo is either too low resolution, not transparent, or surrounded by too much "white space."

If you want to post (or PM) a link I can possibly get a better understanding of the issue and help you resolve it.
Reply With Quote
  #3  
Old 05-28-2017, 03:39 AM
webmastersun's Avatar
webmastersun webmastersun is offline
 
Join Date: Oct 2013
Location: www.webmastersun.com
Posts: 433
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SteveAngelis View Post
Hello All,

Where would you go to adjust the scaling of the banner at the top of the page, mainly the background banner at the top? I have not seen a spot in the header to make this change.

In short, when the resolution of the screen or the size of the browsing window changes, the image squishes in and the size of it changes with the window size. As such, it makes the proportions look off. Is there a place that I can change this?
You can use css width 100% to make your images auto resize when it appears on different screen sites.

I am using this way to make banners as responsive on our webmaster forum.

Hope that helps!
Reply With Quote
  #4  
Old 05-28-2017, 10:17 AM
In Omnibus's Avatar
In Omnibus In Omnibus is offline
 
Join Date: Apr 2010
Location: Inside A Blade Server
Posts: 840
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by webmastersun View Post
You can use css width 100% to make your images auto resize when it appears on different screen sites.

I am using this way to make banners as responsive on our webmaster forum.

Hope that helps!
Yes, but the logo in vBulletin 5 is already responsive so there should be no reason to have to add a CSS attribute to the additional.css template. In fact, it is responsive for both tablets and phones. The media queries activate twice. That's why I asked for more information.
Reply With Quote
  #5  
Old 05-28-2017, 12:10 PM
SteveAngelis SteveAngelis is offline
 
Join Date: Nov 2009
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My web site is http://svcommand.com/sv8/
Reply With Quote
  #6  
Old 05-28-2017, 12:52 PM
In Omnibus's Avatar
In Omnibus In Omnibus is offline
 
Join Date: Apr 2010
Location: Inside A Blade Server
Posts: 840
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SteveAngelis View Post
OK. The problem is your banner is in jpg format which means it loses resolution when it is resized. You need the banner to be in .png or svg format for the best resolution at all sizes.

I can convert the header image to .png for you but I can't upload it here due to their attachment limits. It converts anything over 1024px wide to a jpg.
Reply With Quote
  #7  
Old 05-28-2017, 04:16 PM
noypiscripter's Avatar
noypiscripter noypiscripter is offline
 
Join Date: Jul 2013
Posts: 468
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm on my phone and I see the banner squished. I think it has to do with the fixed height of the banner and/or its container. If the height is fixed and the width changes then the image dimensions will not be proportionate thus causing the issue. I cannot confirm because I cannot inspect the element and css.
Reply With Quote
  #8  
Old 05-28-2017, 05:22 PM
In Omnibus's Avatar
In Omnibus In Omnibus is offline
 
Join Date: Apr 2010
Location: Inside A Blade Server
Posts: 840
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by noypiscripter View Post
I'm on my phone and I see the banner squished. I think it has to do with the fixed height of the banner and/or its container. If the height is fixed and the width changes then the image dimensions will not be proportionate thus causing the issue. I cannot confirm because I cannot inspect the element and css.
#header .site-logo {
padding: 22px 10px 26px 10px;
background: transparent;
position: relative;
text-align: left;
}
Reply With Quote
  #9  
Old 05-29-2017, 02:12 AM
noypiscripter's Avatar
noypiscripter noypiscripter is offline
 
Join Date: Jul 2013
Posts: 468
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The site is actually not using a logo. The banner is a background image to a custom div with class headerwrap and it (including some of the custom child tags) has a fixed height of 201px. The fixed height seems to be required in order to render the header properly.

The easiest solution without changing the custom HTML tags is to change the "background-size" CSS property from "100% 100%" to "cover". Some parts of the background image will be clipped but this ensures that the image is not squished.

Code:
.headerwrap {
    height: 201px;
    background-image: url(core/images/eridanus/eridanus_headerbg.jpg);
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
}
"background-size: contain" is the ideal solution to prevent the image from being clipped but it requires changing the fixed height to whatever proportionate value based on the current available width.
Reply With Quote
  #10  
Old 05-29-2017, 10:31 AM
In Omnibus's Avatar
In Omnibus In Omnibus is offline
 
Join Date: Apr 2010
Location: Inside A Blade Server
Posts: 840
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by noypiscripter View Post
The site is actually not using a logo. The banner is a background image to a custom div with class headerwrap and it (including some of the custom child tags) has a fixed height of 201px. The fixed height seems to be required in order to render the header properly.

The easiest solution without changing the custom HTML tags is to change the "background-size" CSS property from "100% 100%" to "cover". Some parts of the background image will be clipped but this ensures that the image is not squished.

Code:
.headerwrap {
    height: 201px;
    background-image: url(core/images/eridanus/eridanus_headerbg.jpg);
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
}
"background-size: contain" is the ideal solution to prevent the image from being clipped but it requires changing the fixed height to whatever proportionate value based on the current available width.
All of the above is true except the banner also distorts on larger resolution screens. That's why I offered the png in replacement of the jpg. The image is only 1499px wide so any resolution higher than that stretches the banner.
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 11:16 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.08079 seconds
  • Memory Usage 2,264KB
  • Queries Executed 13 (?)
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_code
  • (5)bbcode_quote
  • (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
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (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_postinfo_query
  • fetch_postinfo
  • 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
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete