Background Image

  • I’m fairly new to HTML programming and I was looking up the best way to include a background image and make it fill the whole page instead of repeating. One of the tutorials I found had a few lines of code I hadn’t seen before. The site in question recommended:
    background-image: url(“Images/Background.gif”);
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    I’m curious what the middle three lines of code accomplish. So far as I can tell, at least in my case, the end result doesn’t seem to change whether those lines of code are present or not. Are they necessary, or simply the preference of the individual who wrote the tutorial?

  • You might have more luck on getting an answer in a forum dedicated to HTML and CSS.

  • That is an excellent point, my apologies.