• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Problem with css file paths

 
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok i have a domain directory called TEF. now the actual path is like root/blah/moreblah/folder/folder2/TEF.
but if you type www.theepicfew.com it will just automatically go to TEF.

Now here is the problem. I have a bunch of external style sheets in /TEF/Stylesheets. But for some reason when I link my css in index.php like so:

<link rel="stylesheet" type="text/css" href="Stylesheets/Navigation.CSS" />

for some reason, the style changes are not getting applied to the page.

if you go to http://www.newfazeindustries.com/guild/guildarmory/guildarmory
and then http://www.theepicfew.com, you'll see the difference.

I tried doing "/Stylesheets/Navigation.CSS", but no luck.

But I have the folder structure the exact same as it is on newfazeindustries, but it doesnt work on theepicfew for some reason....

This might be a really dumb question, but I'm not all that familiar with this stuff.

Thanks,

Justin
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Add the app context path to the CSS file path.
 
Justin Fox
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm sorry if I come off as annoying, but what is the app context path?

Thanks again,

Justin
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not annoying at all.

It's what's necessary to create a full pathname for web-app-relative files. You can use JSTL's <c:url> tag, a scriptlet <%= request.getServletContext...%> (or something like that, I actually don't remember). Searching the web for something like "jsp +get context path" will turn up a lot of hits.
 
Justin Fox
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh ok, I'll see if there is a way to do it in php.. that's the server sided code I'm using and don't know if the server supports JSP.

Thank man!

Justin
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh. That's a completely different question, since PHP doesn't have an equivalent to contexts. You shouldn't need to do anything at all.
 
Justin Fox
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
well it's weird, because my script files are working just fine, only my .CSS files are not being recognized (so i think), but I have all the functionality of my site in external .js files and they work just fine.

but even when I try to do a link like so:

admin

where admin.php is in the same directory, gives me a broken link error.

I'm not sure what's going on then....

Justin
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When I navigate to http://www.theepicfew.com/Stylesheets I get a 404 whereas when I navigate to http://www.theepicfew.com/Scripts I get a Forbidden error, which makes sense. But the 404 would imply that path doesn't exist at all. Are you sure it is there?
 
Justin Fox
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
lmao wow, it was case sensitive..... on my server it wasn't, but on the godaddy one it was >: (.

it was "StyleSheets" not "Stylesheets".

Sorry for the fuss over nothing.

Thanks for all the help though.

Justin
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Justin Fox wrote:lmao wow, it was case sensitive..... on my server it wasn't, but on the godaddy one it was >: (.

it was "StyleSheets" not "Stylesheets".

Sorry for the fuss over nothing.

Thanks for all the help though.

Justin



Windows is not case sensitive, linux is.
 
Justin Fox
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ah, I thought I had a linux server on 1and1, maybe not.

I'll never forget now : ).

Justin
reply
    Bookmark Topic Watch Topic
  • New Topic