loading background image of a div
i can't seem to load the background image with the code below...
<div align="center"; style="background-image:url('../images/banner1.png');">
and the one without the quotes doesnt work either...
<div align="center"; style="background-image:url(../images/banner1.png);">
how can i load the background image?
Both will work if the div has content or height & width have been defined.
Remove the semi-colon
<div align="center"; style
ok there is width and height but i had removed the width and height in the code, for the sake of posting clarity. Here is the code right now, and I also removed the semi - colon.
Originally Posted by Fang
<div align="center" style="background-image:url('../images/banner1.png'); padding:50px 0px 0px 0px; width: 690px; height: 300px; float:left;">
still not bringging up the background image. and yes the div has content in it, it is an amazon.com widget, does it have any effect?
Check the url... the server is probably looking for the files relative to the server root, in which case '../images/...' wouldn't make much sense.
Assuming the path and file name is correct, then the widget is probably covering the div so you won't see the background image.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)