• Post Reply Bookmark Topic Watch Topic
  • New Topic

CSS not loading

 
Gina vernon
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am working with a jsp page where the included css stylesheet formatting can be seen in the IDE's (Jdeveloper) design tab, but does not load when the page is loaded in an instance of Jdeveloper's local server.

Here's my jsp code:


Thanks.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65524
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<link rel="stylesheet" href="../css/standard.css" type="text/css"></link>


Page relative addresses are OK in static web sites, but they just don't cut the mustard in a dynamic web app where URLs are mapped rather than representing the file system.

Use server-relative address beginning with the context path.

There's a JSP FAQ entry on this issue with examples.
 
Mark E Hansen
Ranch Hand
Posts: 650
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I realize this is off-topic in this forum, but doesn't the style sheet reference link have to be in the <head> section, not in the <body>?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65524
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Should be -- but the browsers are generally pretty lenient with sloppy HTML.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!