_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/centera ctivetab.p ng);
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!!
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/centera
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!!
check the path to the css file. That seems to be the problem here.
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.
cursor: default;
TO
cursor: pointer;
the changes are reflected.
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
might be that tomcat is not configured to read png extensions ?try with either bmp or gif or jpeg
ASKER
nope...don't work
can u check the path
background-image : url(../images/Tabs/centera ctivetab.p ng);
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..
background-image : url(../images/Tabs/centera
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Do you mind if I claim my points back?
do i've an alternative ?? claim it back....
ASKER
thanks =)