make div responsive to screen size
Note, the shift of users from smaller screen sizes (393 *373) has droped. You can apply the same logic to phones, tablets, tv and desktop. Examples might be simplified to improve reading and learning. An adverb which means "doing without understanding", what's the difference between "the killing machine" and "the machine that's killing". This example was provided by an Anonymous user on JSFiddle. In the original window size, all the three blocks are aligned horizontally. The length can not be negative. The content of the second <p> element having a "hidden-mobile" class will be hidden on devices smaller than 767px. The equivalent shorthand CSS notation for the above is: body { background: url (background-photo.jpg) center center cover no-repeat fixed; } All you have to do is change the url value to point to the location of your background image, and you're good to go. If the max-width property is set to 100%, the image will scale down if it has to, but never scale up to be larger than its original size: The HTML