No of visitors who read this post: 312
Type: Question
Author: Iris coulter
No votes yet

I have two images and want to apply both images to my web page background,is there any way to do this using HTML or CSS?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

# Comment Id: 49005

You can use any image as a background in your web page.

You just need to host the image using any file hosting site so that the image can be displayed.

Or you can upload the image to be used as background in your website then just copy its URL.

Here are some of the scripts that can be used to display the image as a background in your webpage using CSS.

Just add this script to your CSS file.

  • background-image: url(http://SAMPLE:i42.tinypic.com/wupbx4.jpg); – just replace the URL inside the parenthesis with the URL of your image
  • background-attachment: fixed;
  • background-position: center center;
  • background-image max width: 1124, 1138 – replace the numbers with the right values for your image
  • background-image max height: 588, 674 – replace the numbers with the right values for your image

Regards
Sharath Reddy