Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Style sheets & Mozilla

1 view
Skip to first unread message

Vince Morgan

unread,
Nov 3, 2006, 8:12:09 PM11/3/06
to
Hi All,
I'm having a bit of a problem with a style sheet.
I thought it could perhaps be a path problem, but I've eliminated that one
by dropping it into the document root and the behaviour remained the same.
The link is between the '<head></head>' tags and works in IE, but not
Mozilla.
So I tried '<style>@import url(..Styles/sheet.css); </style>' wich also
works fine in IE, but didn't in Mozilla.
As the page is generated via php I eventualy loaded the sheet into a var and
embedded it, which works fine in either browser.
Although I've found a workable solution I'm still very curious and would
like very much to know why the standard methods are not working for me in
Moz.
Any info or help with this is more than welcome,
TIA
Vince Morgan


dorayme

unread,
Nov 3, 2006, 9:02:29 PM11/3/06
to
In article <454be8c1$0$22937$afc3...@news.optusnet.com.au>,
"Vince Morgan" <vin...@UNSPAMoptusnet.com.au> wrote:

Show us the url with it in the head, and what platform, OS ,
which particular version of browser?

--
dorayme

Vince Morgan

unread,
Nov 3, 2006, 11:07:19 PM11/3/06
to

"dorayme" <dorayme...@optusnet.com.au> wrote in message
news:doraymeRidThis-ADD...@news-vip.optusnet.com.au...

> Show us the url with it in the head, and what platform, OS ,
> which particular version of browser?
>
> --
> dorayme

Hi Dorayme,
The IE vers is 6.0.2800.1106;
Mozilla ActiveX Control v1.7.12;
OS win2000.
The IDE is Dev-PHP 2.0.12.
I'm working in an IDE (local server) as I don't have a server on this
(win2000) machine.
However, below I have included code that replicates the problem when using
<link>.
The directory struct is,

Root
|-\Styles
|-\HTML

In the 'HTML' dir;
<snip>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Page-Enter" content="blendTrans(Duration=0.2)">
<meta http-equiv="Page-Exit" content="blendTrans(Duration=0.2)">
<link rel=StyleSheet href="../Styles/reqHeader.css" type="text/css">

<script type="text/javascript">
var theForm = null;
</script>

</head>
<body>
<div class="Head">This is a test.<div>
</body>
</html>

</snip>

In the 'Styles' dir;
<snip>

.Head
{
color:#306090;
font-family:Helvitica, Arial;
font-weight:Bold;
font-size:16px;
}

</snip>

Perhaps the Mozilla control doesn't work exactly the same as the stand-alone
browser? Thinking aloud textualy :)

Vince


dorayme

unread,
Nov 4, 2006, 2:39:25 AM11/4/06
to
In article <454c11ca$0$22937$afc3...@news.optusnet.com.au>,
"Vince Morgan" <vin...@UNSPAMoptusnet.com.au> wrote:

First thing I notice is no "" around the word Stylesheet in the
link to the sheet. But this is perhaps no problem. Next I notice
a failure to close the div after the test sentence. I reckon this
is a bit more important. Anyway, on the Mac version of Mozilla
(1.7.12) it does not stop it from appearing ok and being
controlled by the css when the file directory is as follows: the
css is in a folder (called Styles) within another folder. In this
last folder is another folder which contains the html file.

OK, lets take this again. I made a folder called "top", inside I
had 2 folders, one called "Styles" and one called "html". Inside
Stles was reqHeader.css while inside html was test666.html. This
had to be like this otherwise, no go. So are you getting your
paths right?

--
dorayme

Vince Morgan

unread,
Nov 5, 2006, 12:45:12 AM11/5/06
to
"dorayme" <dorayme...@optusnet.com.au> wrote in message
news:doraymeRidThis-A63...@news-vip.optusnet.com.au...

> First thing I notice is no "" around the word Stylesheet in the
> link to the sheet. But this is perhaps no problem. Next I notice
> a failure to close the div after the test sentence. I reckon this
> is a bit more important. Anyway, on the Mac version of Mozilla
> (1.7.12) it does not stop it from appearing ok and being
> controlled by the css when the file directory is as follows: the
> css is in a folder (called Styles) within another folder. In this
> last folder is another folder which contains the html file.
>
> OK, lets take this again. I made a folder called "top", inside I
> had 2 folders, one called "Styles" and one called "html". Inside
> Stles was reqHeader.css while inside html was test666.html. This
> had to be like this otherwise, no go. So are you getting your
> paths right?
>
> --
> dorayme
Yes, sorry, my bad Dorayme. Such a small piece of code too.
Neither of those errors actualy made any difference to the problem though.
It seems from the above that your directory structure, the one that works,
is exactly as mine is here.
It still won't work within the IDE I'm using, but it's quite possible that
it will on my employers server.
I guess I'll find out tomorrow, all going well. The workaround is suitable
so I won't frett too much about it.
Thank you very much for taking the time to check it for me Dorayme.
Regards,
Vince


dorayme

unread,
Nov 5, 2006, 1:03:33 AM11/5/06
to
In article <454d7a3e$0$11968$afc3...@news.optusnet.com.au>,
"Vince Morgan" <vin...@UNSPAMoptusnet.com.au> wrote:

The only other thing is ... perhaps it has been mentioned... some
servers are case sensitive, some not. Check carefully to have the
exact names re case in the links...

--
dorayme

Michael Winter

unread,
Nov 5, 2006, 9:30:36 AM11/5/06
to
Vince Morgan wrote:

> I'm having a bit of a problem with a style sheet. ... The link is


> between the '<head></head>' tags and works in IE, but not Mozilla.

[snip]

> As the page is generated via php I eventualy loaded the sheet into a
> var and embedded it, which works fine in either browser.

When PHP was generating the style sheet, did you set the Content-Type
header appropriately? Mozilla will, quite reasonably, refuse to use a
style sheet that isn't labelled with the text/css MIME type. This would
have been reported in the error console.

[snip]

If you still have problems, post a /link/ to a simple demonstration.

Mike

Jim Moe

unread,
Nov 5, 2006, 11:06:13 AM11/5/06
to
Vince Morgan wrote:
> So I tried '<style>@import url(..Styles/sheet.css); </style>' wich also
> works fine in IE, but didn't in Mozilla.
>
I suppose you meant "../Styles/sheet.css".
Mozilla respects the concept of DocumentRoot. If <Styles> is located
above the DocumentRoot, Mozilla cannot get to it. IE ignores such pesky
standards limitations.

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)

Michael Winter

unread,
Nov 5, 2006, 11:43:49 AM11/5/06
to
Jim Moe wrote:

[snip]

> Mozilla respects the concept of DocumentRoot. If <Styles> is located
> above the DocumentRoot, Mozilla cannot get to it. IE ignores such pesky
> standards limitations.

What? That makes absolutely no sense.

Mike

Jim Moe

unread,
Nov 6, 2006, 5:09:55 PM11/6/06
to
Michael Winter wrote:
>
>> Mozilla respects the concept of DocumentRoot. If <Styles> is located
>> above the DocumentRoot, Mozilla cannot get to it. IE ignores such pesky
>> standards limitations.
>
> What? That makes absolutely no sense.
>
Yeah, good point. There server should prevent any such inappropriate
behavior. I am not sure what issue I was thinking about when I wrote that,
but the above is drivel.

Vince Morgan

unread,
Nov 6, 2006, 7:25:42 PM11/6/06
to
"Vince Morgan" <vin...@UNSPAMoptusnet.com.au> wrote in message
news:454be8c1$0$22937$afc3...@news.optusnet.com.au...

Well, the links worked fine on the companies server, and today they also
work fine in the IDE.
I would love to report why they weren't working, if only I knew.
Occasionaly I get a glitch in the IDE, which is otherwise very good, and I
guess this was one of them.
Thanks Dorayme for trying to reproduce them, and to everyone who offered
their thoughts.
Regards,
Vince Morgan


Toby Inkster

unread,
Nov 7, 2006, 12:38:48 PM11/7/06
to
dorayme wrote:

> The only other thing is ... perhaps it has been mentioned... some
> servers are case sensitive, some not. Check carefully to have the
> exact names re case in the links...

If it was a problem with case, it wouldn't be specific to a single browser.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

Vince Morgan

unread,
Nov 19, 2006, 2:15:16 AM11/19/06
to
"Vince Morgan" <vin...@UNSPAMoptusnet.com.au> wrote in message
news:454be8c1$0$22937$afc3...@news.optusnet.com.au...
Well, for what it's worth, I found the reason for this. I discovered that
it only happens after I add a <!DOCTYPE...> . Mozilla then requires that
the MIME type for the css be "text/css", and will not load if the MIME type
is presented as "text/plain", which is what my localhost server is
apparently serving up.
Regards,
Vince Morgan


0 new messages