Style sheet not recognised

Hi - Not really a Dynamo question but Walter is probably listening in!

I know that this has been covered before and that it is a server mime type issue.

One of my customers has a site that does not recognise the external style sheet and so does not style the text etc.

The answer was to change the server to accept the .css file as the correct mime type - but I cannot for the life of me find the reference that I had to this. It is probably at the office machine but I cannot access it for the next couple of days and am trying to get the problem sorted as quick as.

Once I know the correct mime type can I add it via an .htaccess file or will I have to get the hosting co to do it for me?

Thanks - David


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Depends on the hosting company, but usually anything at all can be
done at the .htaccess level. Try this (one of them will work, use
only one!):

AddType text/css .css

<FilesMatch "*.css">
	ForceType text/css
</FilesMatch>

Walter

On May 1, 2008, at 8:09 PM, DeltaDave wrote:

Hi - Not really a Dynamo question but Walter is probably listening in!

I know that this has been covered before and that it is a server
mime type issue.

One of my customers has a site that does not recognise the external
style sheet and so does not style the text etc.

The answer was to change the server to accept the .css file as the
correct mime type - but I cannot for the life of me find the
reference that I had to this. It is probably at the office machine
but I cannot access it for the next couple of days and am trying to
get the problem sorted as quick as.

Once I know the correct mime type can I add it via an .htaccess
file or will I have to get the hosting co to do it for me?

Thanks - David


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks Walter

Much appreciated - will try it straight away.

David


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Sorry - neither worked.

Did the code come out alright on the web Walter in case that was the problem

David


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Yes, it looks fine on the Web. Try looking at the page in question
using Firefox and Firebug. You will be able to see exactly what mime-
type is being sent along from your server. Can you post a link? I can
look at it here and see if that is indeed the problem.

Walter

On May 1, 2008, at 9:11 PM, DeltaDave wrote:

Sorry - neither worked.

Did the code come out alright on the web Walter in case that was
the problem

David


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I wonder if the problem could be something else - the site was created with DW and the index.html
has this at the start of the page:

<?php

include_once("../../RepeatingHTML/head.html");
include_once("../../RepeatingHTML/titleBar1.html");
?>

The document

RepeatingHTML/head.html

Has the reference to the style sheet in it.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>R & W Hall Chartered Surveyors</title>
<link href="../../../R&amp;WHall.css" rel="stylesheet" type="text/css" />
</head>

Might either of these be the problem?

David


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Walter

Its at:

http://www.rwhall.co.uk/webpages/NewSite01May2008/index1.html

D


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Is that &amp; really in the filename? That looks fishy to me. Also,
unless this page is really three layers down in the file hierarchy, I
doubt sincerely that the path to the css file is where this file says
it is. In order for this path to be correct, you would need to reach
this HTML file using a URL like this:

http://www.example.com/some/folders/here/yourpage.html

Seriously, I think the entire problem is in the filename. Get rid of
the & sign in it.

Walter

On May 1, 2008, at 9:26 PM, DeltaDave wrote:

I wonder if the problem could be something else - the site was
created with DW and the index.html
has this at the start of the page:

<?php

include_once(“…/…/RepeatingHTML/head.html”);
include_once(“…/…/RepeatingHTML/titleBar1.html”);
?>

The document

RepeatingHTML/head.html

Has the reference to the style sheet in it.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"   

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>



R & W Hall Chartered Surveyors

Might either of these be the problem?

David


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Change the filename of the page to index1.php. Right now, your
includes aren’t firing because the PHP is not being executed and
replaced.

Walter

On May 1, 2008, at 9:35 PM, Walter Lee Davis wrote:

Is that &amp; really in the filename? That looks fishy to me. Also,
unless this page is really three layers down in the file hierarchy, I
doubt sincerely that the path to the css file is where this file says
it is. In order for this path to be correct, you would need to reach
this HTML file using a URL like this:


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I did wonder that.

I didn’t create it - just host it for a friend whose son (student) is revamping his site for him in DW.

And was asked the question about why it wasn’t displaying it properly - is there something wrong with the server?

Immediately I thought back to the time some months ago when there was the mime type issue and immediately thought that was the problem.

It appears that may not be the case.

Can that sort of include that he has used be done without PHP/making the pages all .php

David


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

He also refers to the css file R&WHall.css (the actual filename on the server is R&WHall.css)

Is the ampersand allowed on the server?

D


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

If the server is set up to use server-side includes, then it could be
done with Apache includes:

<!--#include file="path/to/file.inc"-->

and then you have to rename the page to index1.shtml

There’s one other way around it, but it involves forcing all html to
go through the php interpreter:

<FilesMatch "*.html">
	ForceType application/x-httpd-php
</FilesMatch>

That is a brute-force way to get things to work for now.

Walter

On May 1, 2008, at 9:49 PM, DeltaDave wrote:

I did wonder that.

I didn’t create it - just host it for a friend whose son (student)
is revamping his site for him in DW.

And was asked the question about why it wasn’t displaying it
properly - is there something wrong with the server?

Immediately I thought back to the time some months ago when there
was the mime type issue and immediately thought that was the problem.

It appears that may not be the case.

Can that sort of include that he has used be done without PHP/
making the pages all .php

David


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

The ampersand is not allowed in HTML, but it is a legal filename.
It’s just not a very smart one. I would change that and all
references to it to something that contains no punctuation except the
dot between filename and extension.

Walter

On May 1, 2008, at 9:55 PM, DeltaDave wrote:

He also refers to the css file R&WHall.css (the actual filename
on the server is R&WHall.css)

Is the ampersand allowed on the server?


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

It seems a bit daft to set up the pages in this way to include both

include_once("../../RepeatingHTML/head.html");
include_once("../../RepeatingHTML/titleBar1.html");

When he could just set his template page up with them on it! and not have to use php at all.

Or am I missing something?

D


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options