Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

CSS: Cause Full, Not Cropped, Background Image To Be Seen


  • Please log in to reply
1 reply to this topic

#1 beaujay

beaujay

  • Members
  • 9 posts
  • OFFLINE
  •  
  • Local time:06:52 PM

Posted 01 November 2016 - 08:32 AM

The top and bottom of the background image in my page-in-development are getting chopped off. And in each browser the chopping is a little different: in IE it's both the top and bottom, ditto Firefox, in Chrome it's the top, Vivaldi the top.

 

Here's the style.css background image code:

html {
  background: url('../img/background-image.jpg') no-repeat center center fixed;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
}

How can this code be modified to make the whole background-image.jpg visible in the viewport?

I also want the horizontal and vertical scroll bars to be not visible.



BC AdBot (Login to Remove)

 


#2 gxnpt

gxnpt

  • Members
  • 12 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Northwest Florida - near Destin
  • Local time:05:52 PM

Posted 01 November 2016 - 11:33 AM

Just to clarify, are you stating that the page itself is larger than the visible display portion of your browsers so you are seeing the scroll bars (browser indicating it is smaller than the page) and not the entire page?

 

What is the actual size in pixels of the image?






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users