Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

FireFox 2.0 not picking background in CSS

 
Muhammad Ahsan Jamshaid
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
wondering if this has to do with relative path... (this does not help!)
 
Muhammad Ahsan Jamshaid
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No! i dont thnks so, because made it absolute as well but it did'nt work..

--jamshaid..
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic