473,651 Members | 2,750 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=imagefr ame.CSS&amp;g2_ frames=none%7Cp olaroids"/>
<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 4462
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=imagefr ame.CSS&amp;g2_ frames=none%7Cp olaroids"/>
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=imagefr ame.CSS&amp;g2_ frames=none%7Cp olaroids"/>
<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_mimetyp e = "" 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_mimetyp e = "" 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
12592
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 any visual effect. Everything is fine in IE. Secondly, I am trying to set the background-image of a particular <TD> to an image, and that's not working either. Applying it to the parent <TR> works, as does applying it to other <TD>s in the...
18
8080
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; border:1px solid red;'>Floated left</div> <div id='right' style='float:right; border:1px solid blue;'>Floated right</div>
6
27423
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 vertical scroll bar but no horizontal scroll bar, if firefox though it ignores the height and makes the div just big enough to show its
3
1901
by: neousr | last post by:
var row = document.createElement('TR'); row.setAttribute('class',tipoclase); ..... var cell = document.createElement('TD'); var theButton = document.createElement('input'); theButton.setAttribute('type','button'); theButton.setAttribute('value',description); theButton.setAttribute('class',ButtonClass); cell.appendChild(theButton); row.appendChild(cell);
0
1425
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 that I can drop into the beginning of any page and it will generate HTML to display my logo, a link, and (optionally) a quote of the day, all of which will be horizontally centered at the top of the page by my default stylesheet. For the main page,...
5
5800
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 that I can drop into the beginning of any page and it will generate HTML to display my logo, a link, and (optionally) a quote of the day, all of which will be horizontally centered at the top of the page by my default stylesheet. For the main page,...
3
2423
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 couple of the Firefox is munging up. So, on my information page there is a gridview in the content section of the page. The masterpage contains searching capabilities for the gridview. The masterpage has controls contained in a panel control,...
13
3722
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 clicked it adds the item to the cart array and sums it if the item already exists in the cart. This code works perfectly fine in Internet explorer and firefox, heck I even tested it in chrome and it works. So everything works fine in all browsers...
0
8275
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8802
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8697
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8465
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
4144
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4283
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2699
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1909
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1587
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.