- 1). Open your website's CSS file in your text editor.
- 2). Type:
body {background-image:URL('photourl');}
Replace "photourl" with the URL to the photograph. The photo repeats both horizontally and vertically by default.
To make the photograph repeat only horizontally, type:
body {background-image:URL('photourl'); background-repeat:repeat-x;}
To make the photograph repeat only vertically, type:
body {background-image:URL('photourl'); background-repeat:repeat-y;}
If you do not want the photograph to repeat, type:
body {background-image:URL('photourl'); background-repeat:no-repeat;} - 3). Save the website's CSS file.
- 4). Upload the CSS file to your website's server.
- 5). Open your browser and visit your website to check that the photo background is displaying properly.
previous post