When you create your own website, naturally you want it to display as attractively as possible regardless of the user's browser version. In particular, so that the background image is stretched and adjusted to the resolution of the computer monitor.
It is necessary
skills in working with html, css, java-script
Instructions
Step 1
Open the code for your site in any editor, such as Notepad or a dedicated web design program, Dreamweaver. Paste the following lines into the code to stretch the background of the site. Add Background: url (‘Insert a link to the image’).
Step 2
To size the picture horizontally, use the following code: Background: url (‘Insert a link to the image’ repeat-x), vertically - at the end of the code, replace x with y. If the site is styled in a css file, paste the code into it. This way you will be able to put a rubbery background on your site.
Step 3
Use the following code example to place a background image on a page and automatically stretch it to fit the resolution of the monitor on which the page is being viewed. Example code: body {background: "Insert a link to the background image" () no-repeat fixed left center; then background-size: […].
Step 4
To stretch the background image, simply insert a picture as a background and set its width to 100%. For example, insert the following text into the page code: background image "alt =" Enter the name of the image "/>. Thus, it will be used to fit the width of the picture, but its proportions will be violated.
Step 5
Similarly, you can set the image to stretch in height, use height instead of the width attribute. Or use the following example code for css: background image of the site) "> and after it add 100% width of the image, as in the previous example. Also, you can use the script to find out the user's screen resolution and edit the size of your table for it.