Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #979175

    Hi,
    I’m trying to copy the design (color sections scrolling over an image) on this homepage: http://www.thesteelframingcompany.com.au
    I would like to set the photo as the background image for the whole home page and not repeatedly add it to color sections.

    How would I do this?
    Is it than possible to add color sections with a see-trough background that scroll over the photo?
    Is it possible to achieve this without adding the photo more than once?
    Thank you,
    Lisa

    #979866

    Hey sundara88,
    Sorry for the late reply, you can have a single fixed image for a background so the page content scrolls over the top of it with transparent sections.
    2018-07-01_112455
    First you will give the page a fixed background-image and give it a transparent background color:

    <style>
    body #main {
        background-image: url(https://thesteelframingcompany.com.au/wp-content/uploads/2017/09/Narrawa5Wide.jpg);
        background-position: center center;
        background-size: cover;
        background-repeat: no-repeat;
        background-attachment: fixed;
        height: 100%;
    }
    .main_color {
        background-color: transparent;
    }
    </style>

    If you use this css in your Quick CSS or style.css you will also need to assign the page ID to it so it doesn’t apply this to all pages. One way around this is to add the css above in a code block element at the top of your page.
    Now as you add your content elements they will be transparent until you add a background color, so you can use two color sections with background colors and a space between them to give the illusion of a transparent “window”
    That is really all there is to it.
    I put together an example for you that you can test with, just Enable the Avia Layout Builder Debug and add this shortcode to the debug window and save.

    Best regards,
    Mike

    #980859

    Hi Mike,
    This worked great until I tried to add the page id.
    I tried:
    body .page-id-10 #main {

    but this doesn’t work.
    How do I add 2 page id’s to this?
    Thanks,
    Lisa

    #980860

    Oh I finally figured it out:
    .page-id-10 #main, .page-id-16 #main {

    Thanks!

    You can close the thread.

    #980867

    Hi,
    Glad we were able to help, we will close this now. Thank you for using Enfold.

    For your information, you can take a look at Enfold documentation here
    For any other questions or issues, feel free to start new threads under Enfold sub forum and we will gladly try to help you :)

    Best regards,
    Mike

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘fixed background photo’ is closed to new replies.