Jump to content

no stylesheet applied to page after processing


m1ku5

Recommended Posts

Hello all, first post :)

this may be more of a php question, but im unsure..

 

Ok, so i have a small mvc site going, and im having an issue with losing css formatting for a page.

 

When the page initially loads, it is styled correctly. I have a login form that sends the un and password to a processing page, which checks the password and then loads some variables into my template, and then shows the original page again. when the original page (template) loads, all of my variables are there and everything is the same, but there is no style applied.

 

index page -> posts to a login function in my index controller -> login function then loads the index view, but without css!!!

 

cant figure this one out....help!

 

here are my css imports

 

<style type="text/css" media="all">@import "includes/css/master.css";</style>
<style type="text/css" media="all">@import "includes/css/nav.css";</style>

 

i dont know what else to post to help you help me, juect let me know

 

 

thanks in advance, ill be here more often :)

Change:

 

<style type="text/css" media="all">@import "includes/css/master.css";</style>

<style type="text/css" media="all">@import "includes/css/nav.css";</style>

 

 

to:

 

<style type="text/css" media="all">@import "/includes/css/master.css";</style>

<style type="text/css" media="all">@import "/includes/css/nav.css";</style>

Is this a framework that you designed/developed or is this a third-party one like CodeIgniter, Kohana or otherwise?

 

All we can ascertain at this point is that it is NOT able to locate the .css files (you server logs will show you where it's looking and most likely kicking a 404 back)

this is a framework that i have developed

 

the call to the controller for the login is in the index controller. so the index controller has 2 functions:

 

index

 

and

 

login

 

 

 

the index page posts to action="/login" and then login loads the index view again

 

 

so the css request when the view is reloaded is /login/includes... instead of /includes.

 

 

the same issue is happening with images, so this is clearly a problem with my framework....but what this is, i cant understand. any ideas from what ive told you?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.