This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes CSS is not coming into effect Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "CSS is not coming into effect" Watch "CSS is not coming into effect" New topic
Author

CSS is not coming into effect

Jagdeep Sharma
Ranch Hand

Joined: May 24, 2010
Posts: 121

Guys,

I am facing a problem. I have included a CSS file into a jsp page. When i see webpage in IE. everything works fine but in Firefox. It comes with default page style. I have checked every path and all the things. What could be the reason. I also faced this situation few weeks ago.


Thanks
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60810
    
  65

You may have checked the paths, but we haven't.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Jagdeep Sharma
Ranch Hand

Joined: May 24, 2010
Posts: 121

Bear Bibeault wrote:You may have checked the paths, but we haven't.



vijin das
Ranch Hand

Joined: Jun 07, 2010
Posts: 129

Jagdeep Sharma wrote:I also faced this situation few weeks ago.


Then what you did to solve it...

VIJINDAS
Jagdeep Sharma
Ranch Hand

Joined: May 24, 2010
Posts: 121

vijin das wrote:
Jagdeep Sharma wrote:I also faced this situation few weeks ago.


Then what you did to solve it...





Then i made external stylesheet to inline stylesheet. But at this moment i don't want to do that. Please suggest me some solution.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60810
    
  65

As I suspected you are using page-relative addresses. bad news!

Check the JSP FAQ for information on how to create proper server-relative URLs that begin with the context path.
Jagdeep Sharma
Ranch Hand

Joined: May 24, 2010
Posts: 121

Bear Bibeault wrote:As I suspected you are using page-relative addresses. bad news!

Check the JSP FAQ for information on how to create proper server-relative URLs that begin with the context path.



Hey Bear,

I understand your point. Now i am almost there. But i am using MVC framework for my application. I know the my context path is SERVLET. Now i want to know how to generate server-relative URLs. Can you little bit explain.


Thanks
Jagdeep Sharma
Ranch Hand

Joined: May 24, 2010
Posts: 121

Bear Bibeault wrote:As I suspected you are using page-relative addresses. bad news!

Check the JSP FAQ for information on how to create proper server-relative URLs that begin with the context path.



One more thing Bear. I applied server-relative path. and also checked it (by viewing source in firefox and click on css link). CSS file opens fine. That means my server-relative path is correct. But my problem is still there.

Thanks
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60810
    
  65

Show please.
Jagdeep Sharma
Ranch Hand

Joined: May 24, 2010
Posts: 121

Bear Bibeault wrote:Show please.


Here it is
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: CSS is not coming into effect
 
Similar Threads
Tomcat 5 is not finding the updated .css
JSF - Problems with NetBeans 6.9.1
How CSS works for Images
Status Bar !!
How to place image on particular location on webpage? pixels?