Hi, What went wrong with my coding I test it with this and it works fine: <img src="images/shadow.png" />. But it's not working with this css snippet: background: url(images/shadow.png) bottom center no-repeat; Please help me and thanks in advance.
There is nothing wrong with that. The container may not have enough height to show the background. Fill it with content or give it a height. An incorrect selector name is another reason.
use the following: background: url('../images/shadow.png') bottom center no-repeat; Code (markup): Hope it works!
The image appears everywhere when calling with the <img> tag, but nowhere with the css background snippet. This is so weird. I've made it appeared fine before. The background disappeared when I recode the PHP and replaced it with <?php header('Location: welcome.php'); ?> for <?php include('welcome.php'); ?>. There must be something change with the URL or the <div>. But I can't figure out.
On experiment it works fine to put these lines between the <header></header> tags: <style type="text/css"> #image_holder {background: url(images/shadow.png) bottom center no-repeat; width: 960px; height: 600px;} </style> But it does not work in a stylesheet. Why is this?
Do you have a stylesheet link in the head section? If so, check that it's being loaded. Better yes, show us the full code for the page.
Never mind I did manage to have it shown up with the old fashion of: <style type="text/css"> #image_holder {background: url(images/shadow.png) bottom center no-repeat; width: 960px; height: 600px;} in a separated PHP file. </style>