February 27, 200917 yr Right basicly i am following theses tut's http://www.w3schools.com/html/html_images.asp and it says to add a back ground img i use this html code :- <body background="background.jpg"> but my question is where does that html code know where to look for that background pic because it dont show a pic for me. It shows a blank area. Can anyone help me with this? Thanks again sound
February 27, 200917 yr There are several ways of pointing to a file/image etc. ../ This goes back one directory from the current file, you can keep doing it to go back further. Example: You are in - root -> aboutme -> resume Your images are in - root -> images ../../images/background.jpg ----------------------------------------------------------------------------------------- you can do full root url's if using / dosnt return you to root. /home/username/public_html/images/background.jpg ----------------------------------------------------------------------------------------- or relative url's ( / = from site root) /images/background.jpg ----------------------------------------------------------------------------------------- However I would advice using CSS to place your background image.
February 27, 200917 yr OK you have the code wrong. It should be: body { background-image: url(../images/your_image.png); }
February 27, 200917 yr Author right okey then so i have to upload my image to the net 1st ye ? and it will be able to find the image ?
February 27, 200917 yr do you mean an absolute link? like http://yourdomain.com/images/my_image.jpg ? If so you can, but it's not recommended. Relative linking is the best way to do it.
Create an account or sign in to comment