relative path does not work for images in css


I have the following file structure:


I have an index.php file lying inside the admin folder which calls a file lying in the same folder. has the following code-

<td align="left" valign="top" class="header-bg">
<table width="100%" border="0" cellspacing="0" cellpadding="0">

index.php calls a css file (css.css) through the following code:

<link href="<?php echo (WS_DIR_CSS); ?>/css.css" rel="stylesheet" type="text/css" />

The css lies in the following location: C:/wamp/myproject/admin/webroot/css

The css files has a class which has the following code:

.header-bg {
  background:url(../images/header_bg.jpg) left top repeat-x;

The image header_bg.jpg is not being displayed in the browser. Help anyone?

the image is included relative to the css

if your image lives here...


and your css lives here...


then the rule would be

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

Can you check the element using firebug? Are there any rewrite rules that may be rerouting the request? Do you have read permissions on the image?