Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS make background-image cover whole page

  • This topic is empty.
Viewing 15 posts - 1 through 15 (of 26 total)
  • Author
    Posts
  • #154100
    expandir
    Participant

    Hi!
    My page is http://www.biomayeutika.org/registro

    I’m using woothemes Scrollider theme. Im trying to set up a landing page, so I customized my css to make some elements not visible:

    .page-id-945 #navigation, .page-id-945 #footer-widgets-container, .page-id-945 #footer, .page-id-945 #nav-container,  .page-id-945 #main-nav,  .page-id-945 .nav fl {display:none}
    

    And I want this image to fill the entire screen: grupo-6-ok2.jpg (except for the form). I tried several things, Im not really suceeding…

    .page-id-945 #wrapper{background: none !important;}
    .page-id-945 body {
    background-image:url('http://www.biomayeutika.org/wp-content/uploads/2013/05/grupo-6-ok2.jpg') !important;
    }
    .page-id-945 {background-size: cover !important;}
    

    Help is really appreciated! Thanks!!!

    #154103
    georgearnall
    Participant

    If by this you mean remove the background header, the code is here:

    #content-top {
      background: #f1f1f1; /* Remove this line */
    }
    

    I am not exactly sure this is what you want and may require further explanation.

    #154107
    lrelia
    Participant

    background-size: 100%

    #154275
    expandir
    Participant

    It still doesn’t work… I want to fill the entire screen, not just the #wrapper area, with the image below. What I don’t understand is how to select the “footer” area. I must be lame, but it looks as if firebug doesn’t recognize what selectors to use to “select” this “footer” area.

    In my 24” screen , it looks like this.

    http://ctrlv.in/252095

    Code as of today

    .page-id-945 #wrapper {
    background-image:url('http://www.biomayeutika.org/wp-content/uploads/2013/05/grupo-6-ok2.jpg') !important;
    background-size: cover !important;
    background-size: 100% 100%;
    }
    

    Page: http://www.biomayeutika.org/registro

    Thanks very much everyone.

    #154276
    georgearnall
    Participant

    You should really apply these styles to the body element if you want it to cover the whole page.

    And add background-position-y: (height of header); to the body to bump the image down.

    background-size: 100% 100%; is doing nothing here because background-size: cover !important; has higher specificity, you may as well remove it.

    #154277
    expandir
    Participant

    Thanks George!!!

    what I mean by “fill the entire screen” is that it covers the whole screen EXCEPT for the form. I guess what you said will do the trick. Im going to check it right now. Im very grateful.

    #154278
    expandir
    Participant

    Wellll. I did what you said … no luck.

    I removed : .page-id-945 #footer-widgets-container, .page-id-945 #footer

    And now it looks like this: http://www.biomayeutika.org/registro

    It looks nicer, and it looks like I can select the footer area now. But I don’t still now how to make the background image fill the entire screen…. :( I must be very lame…

    #154279
    georgearnall
    Participant

    Your code should look like this:

    body {
    background-image:url(‘http://www.biomayeutika.org/wp-content/uploads/2013/05/grupo-6-ok2.jpg’) !important;
    background-size: cover !important;
    background-position-y: (height of header);
    }
    

    Also, could you provide a screenshot so I can see what you mean. My monitor is not big enough to see your problems.

    #154281
    expandir
    Participant

    My code looks like this (I only want this in one specific page)

    .page-id-945 body {
    background-image:url('http://www.biomayeutika.org/wp-content/uploads/2013/05/grupo-6-ok2.jpg') !important;
    background-size: cover !important;
    background-position-y: 120px;
    }
    

    How it looks in my 24” screen in chrome and iexplorer:

    http://ctrlv.in/252095

    Thanks!!!

    #154283
    georgearnall
    Participant

    Try this:

    .page-id-945 {
    background-image:url(‘http://www.biomayeutika.org/wp-content/uploads/2013/05/grupo-6-ok2.jpg’) !important;
    background-size: cover !important;
    background-position-y: 120px;
    }
    .page-id-945 #wrapper {
    background: transparent !important;
    }
    

    Are you looking at http://www.biomayeutika.org/registro/, your screenshots seem to be different ? Could you make sure you update the code on the website.

    Thanks

    #154284
    expandir
    Participant

    OMG.. Thanks!

    I readded .page-id-945 #footer-widgets-container, .page-id-945 #footer

    Now it works perfectly…. Thanks very much George. Im learning a lot. Im very grateful. :) Have a good day

    #154449
    expandir
    Participant

    Hey!

    It suddenly stopped working. I didn’t even change the code. When it stopped working, I added some code and changed the image. But the image link is there. This CSS is turning me nuts….

    .page-id-945 {
    background-image:url(‘http://www.biomayeutika.org/wp-content/uploads/2013/10/MG_1263.jpg’) !important;
    background-size: cover !important;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    }
    .page-id-945 #wrapper {
    background: transparent !important;
    }
    
    #154586
    expandir
    Participant

    /bump … please help! I am sorry …. I don’t know what happened

    #154587
    Paulie_D
    Member
    .page-id-945 #wrapper {
    background: transparent !important;
    }
    

    This may reset all the background settings because you used the short version

    You probably meant

    .page-id-945 #wrapper {
    background-color: transparent;
    }
    
    #155204
    expandir
    Participant

    It still doesn’t work. Maybe it has something to do with my pagespeed config? I already contacted them …. It looks as if my image is not really loaded.

    http://ctrlv.in/255350

Viewing 15 posts - 1 through 15 (of 26 total)
  • The forum ‘CSS’ is closed to new topics and replies.