vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Auto Fitted Fixed Backgrounds (https://vborg.vbsupport.ru/showthread.php?t=279843)

discodoran 03-09-2012 11:15 PM

Auto Fitted Fixed Backgrounds
 
Auto Fitted Fixed Backgrounds

Hello i am trying to get the background on my forum to fit the screen of every browser resolution without missing parts on the left and right side. I thought that a Width: 100% Height: 100% rule would sort that out but i need the forum to be fixed to the page so that it does not scroll with the page. Cuttently i have the following set in the stylevar under doc_background

> Background Image Horizontal Offset: Fixed
> Backtground Image Vertical Offset: Top

Is there anything i can add into the additional css to stretch the image to the whole background? I noticed the doc_background being referenced in the vbulletin.css so i decided to add the following after it to no avail.

Code:

/* Set rules to fill background */
        min-height: 100%;
        min-width: 1024px;

        /* Set up proportionate scaling */
        width: 100%;
        height: auto;

        /* Set up positioning */
        position: fixed;
        top: 0;
        left: 0;
}

Code:

position:fixed;
        top:0;
        left:0;

        /* Preserve aspet ratio */
        min-width:100%;
        min-height:100%;
}

I was wondering if anyone had the same problem or would they have a solution to this problem.

Emeralda 04-08-2012 11:13 AM

I'd like to know that too. In vB3 I could just add the additional css in the styles editor, but in vB4 all I get is this limited functionality: http://prntscr.com/7vukb

How would I go on about adding things like fixed, centre, stretching or not, etc.

Adam H 04-08-2012 12:11 PM

I would imagine you would need to do something like :

Code:

html {
    background-attachment: fixed;
    background-color: transparent;
    background-image: url("images/background.jpg");
    background-position: 0 0;
    background-repeat: no-repeat;
    background-size: 100% auto;
}

Something like that should work, Havent tested it but you should be able to tweak it from there.

Emeralda 04-08-2012 01:09 PM

Rawr, thanks. Now, is there a way to make two backgrounds? What I have in mind, one would be a fixed background, and the other on top of it, and moving normally. One acting like this: http://prntscr.com/7vy59 and the other: http://prntscr.com/7vy8a


All times are GMT. The time now is 11:48 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.00972 seconds
  • Memory Usage 1,717KB
  • 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
  • (4)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