Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Background image won't fill window(width) SugarCube 2.12.1

Using SugarCube 2.12.1, I am having trouble getting the background image to fill the window without it wrapping. The image fills height and two thirds width and then fills the rest of the right side with a wrap of the left third.
I have tried this:
# body.forest { background-image: url(h++p://myimage.jpg);
# position: fixed;
# top: 0;
# left: 0;
# min-width: 100%;
# min-height: 100%;
# }
Can anyone help me out with the correct solution?
Thanks

Comments

  • edited February 2017
    That sure is a lot of hashes.

    Try:
    body.forest {
      background-image: url("yoururl");
      background-attachment: fixed; 
      background-repeat: no-repeat;
      background-size: contain; 
     }
    

    If that doesn't work the way you want, you might try out
    background-size: cover;
    

    In place of the last line.

    So, where did all the hashes come from? Is it a formatting thing? I just want to make sure your code isn't like that. Also, are there plus signs instead of t's in your url? I mean the image is showing up right?

    Anyway, all the other stuff you have there you can safely delete, the above code should be enough.
  • Thanks, that worked.

    I changed the tt to ++ and added hash, wasn't sure if the code alone would show up as text or read as code so I altered it. I guess that isn't needed?
  • Thanks, that worked.

    I changed the tt to ++ and added hash, wasn't sure if the code alone would show up as text or read as code so I altered it. I guess that isn't needed?

    There's a little c on the editor that encloses code in that little box.
  • ...wasn't sure if the code alone would show up as text or read as code...
    If you ment when posting code examples on the forums then use the code tag when posting code or markup - it's the C on the editor bar.
  • <p> Awesome Thanks!</p>
    
Sign In or Register to comment.