Link to home
Start Free TrialLog in
Avatar of _MW_
_MW_

asked on

Problem with background images in CSS & Tomcat

Hi,

I have problems displaying background images using CSS through the tomcat server.

I basically have a html file which links to a css file which has the background style. An example of one of the styles is

.centeractivetab
{
    background-image : url(../images/Tabs/centeractivetab.png);
    background-repeat : repeat;
    text-align:left;
    border-bottom:none;
    font-family : verdana,arial,sans-serif ;
    font-size:.8em;
    text-decoration: none;
    cursor: default;
}

The background image appears when I load the html file directly through IE. However, when I load it through the tomcat server, the background image is not there.

I am currently using Tomcat 5.0.

Any idea why is this happening?


Thanks!!
Avatar of sajuks
sajuks

check the path to the css file. That seems to be the problem here.
Avatar of _MW_

ASKER

I am very sure the path to the css file is correct as I can change the attributes... ie if I change the cursor attribute from

cursor: default;

TO

cursor: pointer;

the changes are reflected.
Avatar of _MW_

ASKER

I am really sure its because of Tomcat cause I tried another servlet, IIS, and it worked there.
if you use an extension other then png are you able to view that image file ?
might be that tomcat is not configured to read png extensions ?try with either bmp or gif or jpeg
Avatar of _MW_

ASKER

nope...don't work
can u check the path
background-image : url(../images/Tabs/centeractivetab.png);
i still feel this might be the cause of ur problems. Try placing the centeractivetab.png in the same directory as your script and see if it picks it up. My reasoning being that when the page loads the css file being in another directory and the page being in another directory the path to the centeractivetab.png is bein lost. not sure but if youy could check..

ASKER CERTIFIED SOLUTION
Avatar of _MW_
_MW_

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of _MW_

ASKER

Do you mind if I claim my points back?
do i've an alternative ?? claim it back....
Avatar of _MW_

ASKER

thanks =)