2008年11月25日星期二

Re: [fw-mvc] CSS problem on application path

hi.
my code is: <link href="<?= $this->baseUrl; ?>/css/style.css" rel="stylesheet" type="text/css" media="screen">

It works perfectly on my localhost (MAMP on MAC).
When i copy my project to a Windows Vista PC (with WAMP), it starts the error:

http://application/mypath  => it works perfectly
http://application/mypath/ => the page is showed without CSS efects
 


Em 2008/11/25, às 04:48, Hector Virgen escreveu:

Are you using a relative path to your CSS file? With a trailing slash at the end of the url, the browser will attempt to look in the /mypath folder for the CSS file.

I've found it's best to prefix my CSS paths with a forward slash:

// in a controller
$this->view->headStyle()->appendStylesheet('/mystyles.css');


-Hector


On Mon, Nov 24, 2008 at 7:53 AM, Carlos Castro <carloscastro.carlos@gmail.com> wrote:
Hi everybody,
I have a problem with my application aspect (CSS) when i put a slash (/) at the end of my URL.

Example:

http://application/mypath  => it works perfectly
http://application/mypath/ => the page is showed without CSS efects

Can someone help me to resolve this problem?

Best Regards,
Carlos Castro



没有评论: