aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes FireFox 2.0 not picking background in CSS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "FireFox 2.0 not picking background in CSS" Watch "FireFox 2.0 not picking background in CSS" New topic
Author

FireFox 2.0 not picking background in CSS

Muhammad Ahsan Jamshaid
Ranch Hand

Joined: Jun 01, 2006
Posts: 59
HI
in my application IE7 is working very fine but Mozilla firefox 2.0 does not display background when used in css but if i declare it <td> then it works fine...
here is csss class...

.MenuExpandedNode {
font-family: Arial;
font-size: 12px;
font-weight: bold;
color: #01496B;
background:url(../images/Node.jpg);
} this does not picks background...when use it as <td class = "MenuExpandedNode" >

but when i use it like this <td background="images/ExpandedNode.jpg" >
its works fine.....

Can any one help me out ??...

--Jamshaid...


--Ahsan Jamshaid... SCJP 5(80%)
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

wondering if this has to do with relative path... (this does not help!)


[My Blog]
All roads lead to JavaRanch
Muhammad Ahsan Jamshaid
Ranch Hand

Joined: Jun 01, 2006
Posts: 59
No! i dont thnks so, because made it absolute as well but it did'nt work..

--jamshaid..
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

me again. This may still not help, but are you sure about the filename here ?
Node.jpg instead of ExpandedNode.jpg

Also, did you try "background:url(../images/Node.jpg) center no-repeat;" ?
[ April 24, 2007: Message edited by: Satou kurinosuke ]
Muhammad Ahsan Jamshaid
Ranch Hand

Joined: Jun 01, 2006
Posts: 59
FileName is not the prblm both are images and same... and also i tried "background:url(../images/Node.jpg) center no-repeat;" it but it didnt worked. i tried other combinition too but mozilla is not picking it.

--jamshaid..
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
"images/ExpandedNode.jpg"
does not equal
(../images/ExpandedNode.jpg)

you should also specify image
background-image: url(blah.gif);

Eric
Muhammad Ahsan Jamshaid
Ranch Hand

Joined: Jun 01, 2006
Posts: 59
i did it.. but also didnt work..But i found the solution by changing the directories. Some one told me that css file shuld be placed where jsp's are place( beconz css becomes the part of jsp). B4 this jsp's where at \webapp\template.jsp and css was \webapp\lib\style.css ................. Now placing the style.css in same directory and using background:url(images/Node.jpg) in css it started woriking fine in both IE7 and Firefox 2.0.03...

Thanks all for participating....

--jamshaid..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: FireFox 2.0 not picking background in CSS