Question:
How do i add an image to body background in css for html?
?
2013-05-23 22:22:49 UTC
I am in html, and i want to put a background image in the css for the html, but i cannot figure out how. I know how to program the image not to repeat and where to go,etc. but i do not know how to paste or insert the background image into the css coding. Can someone please give me the code and the explanation of it?

- I have seen that you put this........ EX. body { background-image: url ( 'paper.gif' ); ....... but i do not understand the : url ( 'paper.gif ' ) part. What do i put into the parentheses, etc.
Three answers:
Wisam A
2013-05-23 22:58:13 UTC
Okay, now i did one Website before and this's what i did at the (very very first page)







Lionel Messi







1 Now you see i did --> url(images/bg.jpg); <--- the URL means where is the background image located.

2 images = is the file name i created next to the index.html.

(You don't have to create a file like i did, but just to be organized.

3 bg.jpg = is the background image i used for my home page inside the (images) file.

^ Remember that the image name you type in css should match with the image name you have in the file or any where else.
weatherby
2016-10-28 20:38:06 UTC
history pictures are a splash humorous with css often times try the two of those: history: url(course); history: url('course'); /*be conscious the only costs*/ history-image: url(course); history-image: url('course'); /*be conscious the only costs*/ i individually use the 1st occasion and it has yet to lead me off beam.
?
2013-05-23 22:41:39 UTC
Keep an image in the directory, say '/images/bk.jpg'



this is the css code.



body{

background-image:url('images/bk.jpg');

}

thats it


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...