background doesnt show up |
background doesnt show up |
konqrr |
Sep 26 2006, 08:42 AM
Post
#1
|
Group: Members Posts: 2 Joined: 26-September 06 Member No.: 236 |
I cant get my background image to display and my project is due in like 2 days. Could someone help me out? Here is the code:
CODE <hmtl> <head> <title>The Best Site for...</title> <style type="text/css"> body { background-image: url ('http://img147.imageshack.us/img147/9826/background3wu4.jpg'); background-repeat: no-repeat; background-position: center; } img.leftmargin { margin-left:px; margin-top:px; } img.leftmargin2 { margin-left:px; } <!-- ok, so for "top" margin value the greater amount controls it. for ex. the "0px" has no effect. so only one top margin value is needed. also, for img2, the left margin controls how far it is from the first pic, not from the left of the browser... unlike pic 1 where margin left controls how far it is from the left of the browser --> img.leftmargin3 { margin-left:px; } img.leftmargin4 { margin-left:px; } img.leftmargin5 { margin-left:px; } img.leftmargin6 { margin-left:px; } </style> </head> <body> <!-- <img class="leftmargin" src="xxx.jpg"> --> <!-- <img class="leftmargin2" src="xxx.jpg"> --> <!-- <img class="leftmargin3" src="xxx.jpg"> --> <!-- <img class="leftmargin4" src="xxx.jpg"> --> <!-- <img class="leftmargin5" src="xxx.jpg"> --> <!-- <img class="leftmargin6" src="xxx.jpg"> --> </body> </html> PS, I tried hosting on photobucket too, it still doesnt work This post has been edited by konqrr: Sep 26 2006, 08:43 AM |
Christian J |
Sep 26 2006, 09:33 AM
Post
#2
|
. Group: WDG Moderators Posts: 9,656 Joined: 10-August 06 Member No.: 7 |
CODE background-image: url ('http://img147.imageshack.us/img147/9826/background3wu4.jpg'); There's a space after "url". Some other issues: CODE margin-left:px; No value before the px unit. CODE <!-- ok, so for "top" .... left of the browser --> Comments inside a style sheet should look like this: CODE /* comment */ Here are good tools for checking CSS errors: http://jigsaw.w3.org/css-validator/ http://htmlhelp.com/tools/csscheck/ |
konqrr |
Sep 26 2006, 09:45 AM
Post
#3
|
Group: Members Posts: 2 Joined: 26-September 06 Member No.: 236 |
CODE background-image: url ('http://img147.imageshack.us/img147/9826/background3wu4.jpg'); There's a space after "url". Some other issues: CODE margin-left:px; No value before the px unit. CODE <!-- ok, so for "top" .... left of the browser --> Comments inside a style sheet should look like this: CODE /* comment */ Here are good tools for checking CSS errors: http://jigsaw.w3.org/css-validator/ http://htmlhelp.com/tools/csscheck/ OMG I love you. Thank you so much. I was asking my programming teacher all day about this and she didnt know what the problem was. You were a huge help, thank you soooo much |
Lo-Fi Version | Time is now: 23rd April 2024 - 08:17 AM |