473,503 Members | 4,272 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Firefox not applying style...

Hello all,
I have a strange problem with a new install of Gallery2: Firefox does not
display the style of the pages while IE does (but nobody I know uses IE).

I'm not familiar with the way Gallery2 generates its pages but my config
uses Apache (on Windows), php5, MySQL, etc... There are several themes
available in Gallery2 but none display in FF. It's like the CSS is ignored.

The pages I get in the browser contain the following CSS links:
[...]
<link rel="stylesheet" type="text/css"
href="main.php?g2_view=imageframe.CSS&amp;g2_frame s=none%7Cpolaroids"/>
<link rel="stylesheet" type="text/css"
href="modules/core/data/gallery.css"/>
<link rel="stylesheet" type="text/css"
href="modules/icons/iconpacks/silk/icons.css"/>
<link rel="stylesheet" type="text/css" href="themes/matrix/theme.css"/>
[...]

I tried on 4 different machines with different add-ons and Firefox never
displays the style for none of the themes. On one machine I have the 'web
developer' add-on so I started experimenting. First, as a verification, if I
disable css, nothing changes. Then something strange: if I go in the CSS
editor, then suddenly FF displays the page properly ! If I exit, it reverts
to a no-CSS display. Then while in the CSS editor, if I disable embedded
styles, all styles disappear. Does that give anyone a hint as to what's
going on ?!?

PS: anyone can recommand a forum for FF-specific questions of this type ?
Thanks.
--
Guillaume Dargaud
http://www.gdargaud.net/
Feb 16 '08 #1
9 4444
Guillaume Dargaud wrote:
PS: anyone can recommand a forum for FF-specific questions of this type ?
Thanks.
http://support.mozilla.com/forum
Feb 16 '08 #2
Guillaume Dargaud wrote:
>
I have a strange problem with a new install of Gallery2: Firefox does not
display the style of the pages while IE does (but nobody I know uses IE).

<link rel="stylesheet" type="text/css"
href="main.php?g2_view=imageframe.CSS&amp;g2_frame s=none%7Cpolaroids"/>
Make sure the php script is sending the right content type in the
header. Firefox may ignore the stylesheet if the MIME type isn't text/css.

--
Berg
Feb 16 '08 #3
Guillaume Dargaud wrote:
Hello all,
I have a strange problem with a new install of Gallery2: Firefox does not
display the style of the pages while IE does (but nobody I know uses IE).

I'm not familiar with the way Gallery2 generates its pages but my config
uses Apache (on Windows), php5, MySQL, etc... There are several themes
available in Gallery2 but none display in FF. It's like the CSS is ignored.

The pages I get in the browser contain the following CSS links:
[...]
<link rel="stylesheet" type="text/css"
href="main.php?g2_view=imageframe.CSS&amp;g2_frame s=none%7Cpolaroids"/>
<link rel="stylesheet" type="text/css"
href="modules/core/data/gallery.css"/>
<link rel="stylesheet" type="text/css"
href="modules/icons/iconpacks/silk/icons.css"/>
<link rel="stylesheet" type="text/css" href="themes/matrix/theme.css"/>
[...]
Some of the above, I think, is invalid XHTML. E.g. there should be a
space before each '/>'.
Feb 16 '08 #4
Make sure the php script is sending the right content type in the
header. Firefox may ignore the stylesheet if the MIME type isn't text/css.
Apparently that's the hitch. It sends text/html on css files. I've verified
mime.conf and added " AddType text/css css .css" in httpd.conf but still no
go.
The only way I can make it work is to set default_mimetype = "" in php.ini

Doesn't sound normal to me...
--
Guillaume Dargaud
http://www.gdargaud.net/


Feb 17 '08 #5
Guillaume Dargaud wrote:
>Make sure the php script is sending the right content type in the
header. Firefox may ignore the stylesheet if the MIME type isn't text/css.

Apparently that's the hitch. It sends text/html on css files. I've verified
mime.conf and added " AddType text/css css .css" in httpd.conf but still no
go.
The only way I can make it work is to set default_mimetype = "" in php.ini

Doesn't sound normal to me...
Then it your php script.

<?php
// Try setting the header.
header('Content-Type: text/css');
echo $theCss;
?>

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Feb 17 '08 #6
Guillaume Dargaud wrote:
>Make sure the php script is sending the right content type in the
header. Firefox may ignore the stylesheet if the MIME type isn't text/css.

Apparently that's the hitch. It sends text/html on css files. I've verified
mime.conf and added " AddType text/css css .css" in httpd.conf but still no
go.
That's because you're stylesheet links to a .php file, not .css.

Do as Mr Little suggested - put the header in the php script.

--
Berg
Feb 18 '08 #7
Do as Mr Little suggested - put the header in the php script.

Which is easy if I'm the one writing the php (and I do when I do...), but I
get Gallery2 off svn and don't really want to mess with their otherwise
excellent code...
--
Guillaume Dargaud
http://www.gdargaud.net/
Feb 18 '08 #8
Guillaume Dargaud wrote:
>Do as Mr Little suggested - put the header in the php script.

Which is easy if I'm the one writing the php (and I do when I do...), but I
get Gallery2 off svn and don't really want to mess with their otherwise
excellent code...
Well if they use a PHP script to create|deliver their CSS and they do
not set the header with the content type then their "excellent" code is
flawed. Servers are configured (and rightly so) to serve PHP as
"text/html" and you do not want to change that. Your options are to put
the CSS in a file the the server is configured to serve as "text/css",
i.e., "someStyleSheet.css" *or* use the "header" function in PHP to set
the correct content type. That's it. The html attribute "type" will not
override how the server sends the file.

<a href="x.php" type="text/plain">won't work</a>

but

<?php
//x.php
header('Content-Type: text/plain');
echo 'hello world';
?>

will.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Feb 18 '08 #9
On Sun, 17 Feb 2008, Jonathan N. Little wrote:
header('Content-Type: text/css');
Rather
header('Content-type: text/css; charset=utf-8');
or other suitable charset.

--
Solipsists of the world - unite!
Feb 18 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
12586
by: matt cook | last post by:
I have having two problems with the <TD>, CSS, Firefox combination. I would greatly appreciate any information on fixing them. Firstly, none of the padding or margin values I apply to a <TD> have...
18
8061
by: Niels | last post by:
Hi group, I have some problems with clearing floated divs. My usual method works fine in Konqueror, but not in Firefox. Here's an example: <html><body> <div id='left' style='float:left;...
6
27413
by: paulroskilly | last post by:
Hello, Can anyone help with this, I have a div tag : <div style="overflow:scroll; overflow-x:hidden; height=315px"> In IE this renders the DIV fine, it is 315 pixels high and has a...
3
1883
by: neousr | last post by:
var row = document.createElement('TR'); row.setAttribute('class',tipoclase); ..... var cell = document.createElement('TD'); var theButton = document.createElement('input');...
0
1410
by: BACON | last post by:
I'm just starting the process of reorganising my modest little website and cleaning up all the HTML, and the logical place to begin was with the homepage. I made a simple little ASP.NET control...
5
5774
by: BACON | last post by:
I'm just starting the process of reorganising my modest little website and cleaning up all the HTML, and the logical place to begin was with the homepage. I made a simple little ASP.NET control...
3
2410
by: SAL | last post by:
Hello, I did google this issue and found some stuff related to BrowserCaps section of either web.config or machine.config but it didn't work. It seems that most pages in my webapp are okay but a...
13
3705
by: Stever1975 | last post by:
I'm working on something similiar to a shopping cart item page. There is a table of items. Each item has an image, a textbox for the qty and an image for the add button. When the add image is...
0
7194
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7267
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6976
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5566
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4993
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3160
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3148
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
372
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.