This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Stylesheets > December 2005 > Firefox and IE problems with my stylesheet





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Firefox and IE problems with my stylesheet
AJBopp

2005-12-09, 6:50 pm

Ok, I'm trying to be a good little boy and create a site that doesn't
use frames :) Things were going along decently until I uploaded what
little I have done so far to the web server (that is, things were
displaying pretty well on my local machine - not perfect, but we'll get
to that later).

So here's the site: http://www.wesleyumc-vinton.org/beta/index.html

This page displays pretty good in IE, but all the graphics and styles
are gone in Firefox, though it works on my local system. Can anyone
tell me what is Firefox's problem? I have validated it at W3C on my
local system and it says that there is a parse error at

#menu_graphic { background-image: url(img/menu.jpg); background-repeat:
no-repeat; height: 432px; width: 170px; }

but I'm not clear on what this means. I can't see an error myself. I
also tried validating it at the server but it only says something about
an unknown mime type, that I don't understand either.

Secondly, when you look at the page in IE, you'll notice that the text
in the menu links is a little bit off - 1 pixel actually. Home is
positioned fine, Action is a pixel off, Learning is 2 pixels off, etc.
When I look at this on my local system with Firefox, the links are
positioned correctly.

Is there a trick I haven't learned yet to making the position of this
list items appear in the same place in both browsers without creating
separate stylesheets?

Thanks for any help...

AJ

meltedown

2005-12-09, 6:50 pm

AJBopp wrote:
> Ok, I'm trying to be a good little boy and create a site that doesn't
> use frames :) Things were going along decently until I uploaded what
> little I have done so far to the web server (that is, things were
> displaying pretty well on my local machine - not perfect, but we'll get
> to that later).
>
> So here's the site: http://www.wesleyumc-vinton.org/beta/index.html
>
> This page displays pretty good in IE, but all the graphics and styles
> are gone in Firefox, though it works on my local system. Can anyone
> tell me what is Firefox's problem? I have validated it at W3C on my
> local system and it says that there is a parse error at
>
> #menu_graphic { background-image: url(img/menu.jpg); background-repeat:
> no-repeat; height: 432px; width: 170px; }
>
> but I'm not clear on what this means. I can't see an error myself.


This is from your style sheet:
..menu
/* Set the properties of the menu frame on the left side */

#menu_graphic

Take out the comment between .menu and #menugraphic and you won't get
that error
AJBopp

2005-12-09, 6:50 pm

Thanks! That eliminates one problem. Now if I could just get teh CSS to
render in Firefox! :)

AJ

meltedown

2005-12-09, 6:50 pm

AJBopp wrote:
> Thanks! That eliminates one problem. Now if I could just get teh CSS to
> render in Firefox! :)
>
> AJ
>

It must be something to do with your server.
Here's the same page on my server and it works fine in Firefox
http://www.reenie.org/test/test3/
Darin McGrew

2005-12-09, 6:50 pm

AJBopp wrote:

meltedown <groups2@reenie.org> wrote:[color=darkred]
> It must be something to do with your server.
> Here's the same page on my server and it works fine in Firefox
> http://www.reenie.org/test/test3/


Yep. The file http://www.wesleyumc-vinton.org/beta/style1.css is being sent
as application/octet-stream rather than as text/css.
--
Darin McGrew, mcgrew@stanfordalumni.org, http://www.rahul.net/mcgrew/
Web Design Group, darin@htmlhelp.com, http://www.HTMLHelp.com/

"Entering Yosemite National Park: laws of gravity strictly enforced"
meltedown

2005-12-09, 6:50 pm

Darin McGrew wrote:
> AJBopp wrote:
>
>
>
> meltedown <groups2@reenie.org> wrote:
>
>
>
> Yep. The file http://www.wesleyumc-vinton.org/beta/style1.css is being sent
> as application/octet-stream rather than as text/css.


How do you know ? Is there some way of telling what its being sent as ?
AJBopp

2005-12-09, 6:50 pm

Ok, I'm a newbie but this is too weird for words. Why does
http://www.wesleyumc-vinton.org/beta/index.html not render correctly in
FF, but
http://www.wesleyumc-vinton.org/index.html renders OK? Especially since
the CSS in the second case is really crappy and full of errors? (my
first effort at it).

Darin McGrew

2005-12-09, 6:50 pm

AJBopp <ajbopp@XXXXXXXXXX> wrote:
> Ok, I'm a newbie but this is too weird for words. Why does
> http://www.wesleyumc-vinton.org/beta/index.html not render correctly in
> FF, but
> http://www.wesleyumc-vinton.org/index.html renders OK? Especially since
> the CSS in the second case is really crappy and full of errors? (my
> first effort at it).


Do they both trigger the same layout mode? Badly broken documents usually
work better in the quirks layout mode of modern browsers.

But you should start by fixing the (X)HTML and CSS errors, and by
configuring your server to send the correct Content-Type header for your
style sheets.
--
Darin McGrew, mcgrew@stanfordalumni.org, http://www.rahul.net/mcgrew/
Web Design Group, darin@htmlhelp.com, http://www.HTMLHelp.com/

"Entering Yosemite National Park: laws of gravity strictly enforced"
Beauregard T. Shagnasty

2005-12-09, 6:50 pm

AJBopp wrote:

> Ok, I'm a newbie but this is too weird for words. Why does
> http://www.wesleyumc-vinton.org/beta/index.html not render correctly in
> FF, but


Error: The style sheet http://www.wesleyumc-vinton.org/beta/style1.css
was not loaded because its MIME type, "application/octet-stream", is not
"text/css".

> http://www.wesleyumc-vinton.org/index.html renders OK? Especially since
> the CSS in the second case is really crappy and full of errors? (my
> first effort at it).


<http://jigsaw.w3.org/css-validator/....org/index.html>

You need to remove the
<style type="text/css">
from that style sheet.

Use the Web Developer's Toolbar with Firefox, and you can find things
like this in .. double-quick time.
http://chrispederick.com/work/webdeveloper/

--
-bts
-Warning: I brake for lawn deer
meltedown

2005-12-09, 10:52 pm

Beauregard T. Shagnasty wrote:
> AJBopp wrote:
>
>
>
>
> Error: The style sheet http://www.wesleyumc-vinton.org/beta/style1.css
> was not loaded because its MIME type, "application/octet-stream", is not
> "text/css".
>
>
>
>
> <http://jigsaw.w3.org/css-validator/....org/index.html>
>
> You need to remove the
> <style type="text/css">
> from that style sheet.
>
> Use the Web Developer's Toolbar with Firefox, and you can find things
> like this in .. double-quick time.
> http://chrispederick.com/work/webdeveloper/
>

I have the web develepers toolbar and I use it all the time. Its really
handy. When I look at AJBopp's site in FF, it doesn't load the css.
But when I click on "edit css" it loads fine. I can then see the
contents of the page as well as the css in the editor.

However, when I try to look at the style sheet in firefox, it thinks its
an application and tries to download it, instead of simply viewing it,
obviously because the mime type is wrong. But what I would like to know
is how do you get the error that tells you the mime type is
application/octet-stream ?

Inquiring minds want to know !
Arne

2005-12-09, 10:52 pm

Once upon a time *meltedown* wrote:
> Beauregard T. Shagnasty wrote:
> I have the web develepers toolbar and I use it all the time. Its really
> handy. When I look at AJBopp's site in FF, it doesn't load the css.
> But when I click on "edit css" it loads fine. I can then see the
> contents of the page as well as the css in the editor.
>
> However, when I try to look at the style sheet in firefox, it thinks its
> an application and tries to download it, instead of simply viewing it,
> obviously because the mime type is wrong. But what I would like to know
> is how do you get the error that tells you the mime type is
> application/octet-stream ?
>
> Inquiring minds want to know !


I can see it the Javascript Console:
---------
Error: The stylesheet http://www.wesleyumc-vinton.org/beta/style1.css
was not loaded because its MIME type, "application/octet-stream", is not
"text/css".
---------

--
/Arne

Google Group Users, read about The Usenet Improvement Project:
http://blinkynet.net/comp/uip5.html
Beauregard T. Shagnasty

2005-12-09, 10:52 pm

Arne wrote:

> Once upon a time *meltedown* wrote:

How do you get that? You misconfigure your server! <g>
[color=darkred]

AJ will have to get his host to fix it.

There are also lots of servers out there that send CSS files as
application/x-pointplus or something like that. My ISP has had that
error for years on their webmail pages, and they can't find anyone smart
enough to fix it, even though I remind them periodically.
[color=darkred]
> I can see it the Javascript Console:
> ---------
> Error: The stylesheet http://www.wesleyumc-vinton.org/beta/style1.css
> was not loaded because its MIME type, "application/octet-stream", is not
> "text/css".
> ---------


Precisely where I saw it, Arne.

--
-bts
-Warning: I brake for lawn deer
meltedown

2005-12-09, 10:52 pm

Arne wrote:
> Once upon a time *meltedown* wrote:
>
>
>
> I can see it the Javascript Console:
> ---------
> Error: The stylesheet http://www.wesleyumc-vinton.org/beta/style1.css
> was not loaded because its MIME type, "application/octet-stream", is not
> "text/css".
> ---------
>

Ok, now I see it. It's there but it doesn't light up the little red
alert sign. Thanks.
Ed Mullen

2005-12-09, 10:52 pm

meltedown wrote:

> Darin McGrew wrote:
>
>
>
> How do you know ? Is there some way of telling what its being sent as ?


In Mozilla Suite CTRL+I getst the page info display. In Firefox
right-click and choose page info. As far as I know there is no analog
in Internet Explorer.

--
Ed Mullen
http://edmullen.net
http://mozilla.edmullen.net
Great art is as irrational as great music. It is mad with its own
loveliness. - George Jean Nathan
meltedown

2005-12-10, 3:34 am

Ed Mullen wrote:
> meltedown wrote:
>
>
>
> In Mozilla Suite CTRL+I getst the page info display. In Firefox
> right-click and choose page info. As far as I know there is no analog
> in Internet Explorer.
>

Yes but... If a stylesheet is being sent as an application/octet-stream,
I can't open it in firefox. Can you ? So therefore I can't look at the
page info.
Arne

2005-12-10, 6:23 am

Once upon a time *Beauregard T. Shagnasty* wrote:

> Arne wrote:
>
>
> Precisely where I saw it, Arne.


But the strange thing is, when
http://www.wesleyumc-vinton.org/beta/index.html
gives an error and the css is therefore not loaded,

http://www.wesleyumc-vinton.org/index.html
gives "only" a warning and loads the css, the MIME type is the same in
both cases.
--------------
Warning: The stylesheet http://www.wesleyumc-vinton.org/style.css was
loaded as CSS even though its MIME type, "application/octet-stream", is
not "text/css".
--------------

It's not the same css file, but the server and MIME type is the same. So
why is one file loaded but not he other? I can see the same differences
in behavior with css files where the MIME type is wrongly served as
text/plain. Why can't Mozilla be consistent with this?

--
/Arne

Google Group Users, read about The Usenet Improvement Project:
http://blinkynet.net/comp/uip5.html
boclair

2005-12-10, 6:23 am

meltedown wrote:
> Ed Mullen wrote:
>
If a stylesheet is being sent as an application/octet-stream,[color=darkred]
> I can't open it in firefox. Can you ? So therefore I can't look at the
> page info.


Have a look at http://www.pc-tools.net/win32/viewhead/ for example.

Louise
meltedown

2005-12-10, 6:53 pm

Arne wrote:
> Once upon a time *Beauregard T. Shagnasty* wrote:
>
>
>
>
> But the strange thing is, when
> http://www.wesleyumc-vinton.org/beta/index.html
> gives an error and the css is therefore not loaded,
>
> http://www.wesleyumc-vinton.org/index.html
> gives "only" a warning and loads the css, the MIME type is the same in
> both cases.
> --------------
> Warning: The stylesheet http://www.wesleyumc-vinton.org/style.css was
> loaded as CSS even though its MIME type, "application/octet-stream", is
> not "text/css".
> --------------
>
> It's not the same css file, but the server and MIME type is the same. So
> why is one file loaded but not he other? I can see the same differences
> in behavior with css files where the MIME type is wrongly served as
> text/plain. Why can't Mozilla be consistent with this?
>

But it is being consistent. When Firefox acts strange and IE seems fine,
what is usually happening is that IE is incorrectly compensating for bad
code and Firefox is doing exactly what its supposed to be doing.

I don't know for sure but I'd say the difference is that the page that
doesn't load has a strict doctype and the other has transitional
doctype. So FireFox is being less strict on the transitional page and
very strict on the strict page, which is exactly what it should be
doing, while IE is confusing things by trying to guess what is intended,
which basically means it is ignoring the doctype. So its IE that's being
inconsitent.
Arne

2005-12-10, 6:53 pm

Once upon a time *meltedown* wrote:

> Arne wrote:
> But it is being consistent. When Firefox acts strange and IE seems fine,
> what is usually happening is that IE is incorrectly compensating for bad
> code and Firefox is doing exactly what its supposed to be doing.
>
> I don't know for sure but I'd say the difference is that the page that
> doesn't load has a strict doctype and the other has transitional
> doctype. So FireFox is being less strict on the transitional page and
> very strict on the strict page, which is exactly what it should be
> doing, while IE is confusing things by trying to guess what is intended,
> which basically means it is ignoring the doctype. So its IE that's being
> inconsitent.


Yes, I can understand that about webpages. And at least in this cases
the doctype makes the difference. I have not notice that on sites where
the css file had the text/plain type, but i guess it was the case.

But my opinion is that a file (.css or whatever other extensions) that
have wrong MIME type should not be loaded as what the extension says, no
matter the doctype for the webpage the file is supposed to be loaded with.

--
/Arne

Google Group Users, read about The Usenet Improvement Project:
http://blinkynet.net/comp/uip5.html
kchayka

2005-12-10, 6:53 pm

Arne wrote:
>
> http://www.wesleyumc-vinton.org/beta/index.html
>
> http://www.wesleyumc-vinton.org/index.html
>
> It's not the same css file, but the server and MIME type is the same. So
> why is one file loaded but not he other?


It's a quirks vs standards mode thing.

Quirks mode assumes you've got junk coming in, so it lets the MIME type
slide, though you may still see a warning in the JS console.

Standards mode requires the correct MIME type.

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Stan McCann

2005-12-10, 6:53 pm

meltedown <groups2@reenie.org> wrote in
news:D8mmf.302440$7k1.4021@fe12.news.easynews.com:

> Darin McGrew wrote:
>
> How do you know ? Is there some way of telling what its being sent
> as ?


I recieved a download dialog box when I tried to view the stylesheet.
It is not being served properly as text/css although I'm not sure about
the application/octet-stream.

Darin, try resaving the file, copying and pasting if need be into
another editor and make sure it is saved as plain text. Then re-upload
and see if your problem persists.

--
Stan McCann "Uncle Pirate" http://stanmccann.us/pirate.html
Webmaster/Computer Center Manager, NMSU at Alamogordo
http://alamo.nmsu.edu/ There are 10 kinds of people.
Those that understand binary and those that don't.
kchayka

2005-12-10, 10:37 pm

Stan McCann wrote:
>
> Darin, try resaving the file, copying and pasting if need be into
> another editor and make sure it is saved as plain text. Then re-upload
> and see if your problem persists.


FYI, there is nothing wrong with the actual css file. The problem lies
with the server (mis)configuration.

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Ed Mullen

2005-12-11, 3:40 am

meltedown wrote:

> Ed Mullen wrote:
>
> Yes but... If a stylesheet is being sent as an application/octet-stream,
> I can't open it in firefox. Can you ? So therefore I can't look at the
> page info.


Enter the URL for the style sheet in the location bar and hit Enter (or
click the link above). If the file type is incorrectly served as
application/octet-stream Mozilla should show a pop-up prompt indicating
that and ask what you want to do with the file. If not it should simply
display in the browser unless you have a MIME type (Helper Application)
defined for it that performs some other action.

--
Ed Mullen
http://edmullen.net
http://mozilla.edmullen.net
Atheism is a non-prophet organization.
Gus Richter

2005-12-11, 3:40 am

meltedown wrote:
> Ed Mullen wrote:
>
> Yes but... If a stylesheet is being sent as an application/octet-stream,
> I can't open it in firefox. Can you ? So therefore I can't look at the
> page info.


You can also use Web Sniffer:
<http://web-sniffer.net/>

--
Gus
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews