Add background image to one page using CSS upgrade

  • Author
    Posts
  • #806948

    Hi, I’d like to create a page with a registration form (I’m using the contact form) but have it overlayed on top of an image. We have the CSS upgrade and are using DePo Masthead theme. (site http://www.brownmackielibrary.com)
    thanks for your help!
    abigail

    The blog I need help with is brownmackielibrary.com.

    #807053

    In many themes this can be done. We need the URL of the background image and what is the URL of the page you want to put it on?

    #807056
    #807063

    This page, http://egomod.deviantart.com/gallery/5021213 , has 8 different images on it.

    #807066

    You need to download the one you want to use and then it has to be prepared and optimized for the web so that it doesn’t take forever to load on the page. The image when edited and optimized should be no more than 200k in file size, and 150k would be even better. A width of 1500px would be the maximum I would suggest.

    You then upload that image to the media library on your site, get the URL of that image and put it where it says, URL OF IMAGE between the double quote marks.

    body.page-id-2338 {
    background: url("URL OF IMAGE") no-repeat scroll 0 0 transparent;
    }
    #807422

    Sorry about the delay- thanks for your help with this. I can’t figure out how to edit the page’s CSS. It’s not under the CSS tab under Custom design and I don’t see it anywhere on the specific page editor.

    #807423

    You just go to Appearance > Custom Design and paste the above code in the CSS Stylesheet Editor (replacing URL OF IMAGE with the actual URL of the image).

    #807424
    #807425

    That’s because your image isn’t wide enough and it’s left-aligned. Try a wider image, and use this variant:

    body {
    background: url("IMAGE URL HERE") no-repeat fixed transparent center top;
    }

    #807426

    It doesn’t really look any different.- the image is still shifted over to the left.

    #807427

    Strange – in my tests blog it’s centered. (I also forgot you wanted it on one page only, and wrote only “body” above).
    Try this:

    body.page-id-2338 {
    background: url("IMAGE URL HERE") no-repeat fixed transparent center top !important;
    }

    #807428

    Still left-aligned- and also, I’m not seeing any transparent effect. I checked it in Firefox and Explorer. What could I be doing wrong?

    #807429

    Sorry, I don’t know (as I said, this code does make the image centered in my tests blog). You’ll have to wait for Rich (thesacredpath) or staff.

The topic ‘Add background image to one page using CSS upgrade’ is closed to new replies.