Announcement

Collapse
No announcement yet.

How to make body background image fixed and main container semi-transparent

Collapse
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Free Mod How to make body background image fixed and main container semi-transparent

    Having a fixed or non-moving background image while you scroll a page and see it through a semi-transparent container is a nice little effect for your site.

    Add this in css_additional.css template in AdminCP or via Sitebuilder > Style > CSS Editor.

    Code:
    body {
        background: url("path/to/the/background/image.png") no-repeat center fixed;
        background-size: cover;
    }
    #content {
        background-color: rgba(255,255,255,0.8); /* white with 80% transparency (adjust as needed) */
    }
    Important Notes:
    1. Compress the image to minimize file size and not affect page load performance especially for mobile users who may be in a non-Wifi location and have limited data bandwidth. There are tons of image compressors online that can compress images without visible quality loss.
    2. Set "Background Image" to none in the body_background stylevar in Style Variable Editor to avoid the default background image to be still loaded even if a custom one is specified.
    3. I would set the image resolution to 1920 x 1080. Users with higher screen resolution than that will still see the entire browser screen covered with the background image because of background-size:cover in the css.
    Helpful? Donate. Thanks!
    Buy me a coffeePayPal QR Code
    Fast VPS Host for vBulletin:
    A2 Hosting & IONOS

    #2
    this is a fun code ive used but getting into the widgets or odd places became a little trickier....i ended up having to make a "double linear gradient background" or some kinda madness but hey it works...

    i put this in addition to the code glenn provided

    Code:
    #breadcrumbs {background: linear-gradient( rgba(0,0,0,0.7),rgba(0,0,0,0.7)),url("images/smoke_cloud.jpg") no-repeat center fixed;
     background-size: cover;}
    tr.topic-item  {background: linear-gradient( rgba(0,0,0,0.7),rgba(0,0,0,0.7)),url("images/smoke_cloud.jpg") no-repeat center fixed;
     background-size: cover;
     }
    .canvas-layout-container .canvas-widget {background:transparent;}
    
    .pagenav-container {background: linear-gradient( rgba(0,0,0,0.7),rgba(0,0,0,0.7)),url("images/smoke_cloud.jpg") no-repeat center fixed;
     background-size: cover;
     }
     .page1 #breadcrumbs {display:none;}

    Comment


      #3
      Can we see this one in action, please? I didn't get the idea.

      Comment


        #4
        See NumNum's site.
        Helpful? Donate. Thanks!
        Buy me a coffeePayPal QR Code
        Fast VPS Host for vBulletin:
        A2 Hosting & IONOS

        Comment


        • glennrocksvb
          glennrocksvb commented
          Editing a comment
          FYI. This site has changed as it moved to a different forum software.

        #5
        This is someting i .really like it gives a lot more scope for creating unusual themes This is one i done just as a test to see how versitile it could be.


        The possibilities are endless
        Wise men say nothing Fools never listen

        Comment


        • glennrocksvb
          glennrocksvb commented
          Editing a comment
          The video is private.

        #6
        opps will make it public just now

        New Link
        Last edited by willie53; 03-14-2017, 12:21 PM.
        Wise men say nothing Fools never listen

        Comment


        • redragon29
          redragon29 commented
          Editing a comment
          hello, how did you do that?

        #7
        Thank you - I've added this to my site and it looks awesome (as far as I'm concerned, anyway)... Yes, I will slowly convert the web to 8bit lmao

        Comment


          #8
          Found it! Thanks a lot

          Comment


            #9
            Works great. Thanks.
            The transparent background causes some visual issues with another mod that adds dropshadows to everything. But I'd rather have the shadows than the transparent background so I just set opacity 1 in this mod. I might work on a way to mask horizontal shadows in the other mod so I can use transparency again....
            Works in vB 5.6.0.

            Comment

            Users Viewing This Page

            Collapse

            There is 1 user viewing this forum topic.

            • Guest Guest

            Latest Posts

            Collapse

            Working...
            X
            Searching...Please wait.
            An unexpected error was returned: 'Your submission could not be processed because you have logged in since the previous page was loaded.

            Please push the back button and reload the previous window.'
            An unexpected error was returned: 'Your submission could not be processed because the token has expired.

            Please push the back button and reload the previous window.'
            An internal error has occurred and the module cannot be displayed.
            There are no results that meet this criteria.
            Search Result for "|||"