1.

Solve : How to set background image in web page?

Answer»

hey friends, i am trying set a small image in my web site. But that image is small[size: 280 x 177 px] but i want to set that small image in my background. it will be set at WHOLE bg...can you help  me how to set??? waiting.... Use


//your content



In that case image will DISPLAY in repeated x and y format not in whole bg
  If you have an image that small, you really shouldn't be stretching it to fill the entire page, just image how horrible a 280x177 image will look on an average laptop at 1366x768 or EVEN on some machines at 2560x1440 -You'll be able to see the individual pixels!

If you really want to do this bearing in mind how bad it will look, you can use the CSS3 background-size property: http://www.w3schools.com/cssref/tryit.asp?filename=trycss3_background-size2.

Nowadays you should be using CSS for all of your styling, using inline tags like '', '' and '

' is very old fashioned and considered old practice, not to mention the very limited control it gives you over your styling.Yes using CSS is the way to go



Discussion

No Comment Found