![]() |
|
|
|
|
|||||||
| HTML / Design Are you a designer? Or just trying to become one? Great! You'll be able to talk about layouts, and HTML code to help your fellow designers, so everyone can work together to master the tricks of the trade. (Maybe even some JavaScript too!) |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
I would like to make my website more pleasant. How can I put the background image for my website using CSS file?
|
|
#2
|
||||
|
||||
|
Find an appropriate image. The image you'll need is 1500 pixels wide, it is because at larger resolutions should be seen whole background. Create a folder in the root directory named 'images' and paste in the image file. Edit CSS file and copy the following content in it:
HTML Code:
body {
background: #40413c url(images/background.jpg);
background-position: top center;
background-repeat: no-repeat;
margin-top: 350px;
}
HTML Code:
<head> ............ <link rel="stylesheet" type="text/css" href="style.css"/> </head> |
![]() |
| Tags |
| background, hosting, image, website |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|