There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
access audio avg avg 8 bios blue screen boot bsod computer connection cpu crash css dell desktop dma driver drivers dvd email error excel explorer firefox firefox 3 freeze gimp graphics hard drive hardware hijackthis hjt install internet internet explorer itunes keyboard laptop macro malware monitor motherboard network networking outlook outlook 2003 outlook 2007 outlook express pio problem problems router seo server slow sound sp3 spyware trojan usb video virtumonde virus vista vundo windows windows vista windows xp winxp wireless
Web Design & Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
Solved: FireFox & Netscape CSS Rendering


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

 
Thread Tools
pcpro17's Avatar
Senior Member with 233 posts.
 
Join Date: Oct 2006
Location: Wisconsin, USA
Experience: Advanced
14-Jun-2007, 04:25 PM #1
Exclamation Solved: FireFox & Netscape CSS Rendering
Hello. Does anyone have any ideas as to why FireFox and Netscape will not render the CSS on my website (www.correctnesscommentary.com)? FireFox will render the CSS, if I open the editor pane in the developer toolbar. Any suggestions are appreciated. Thanks.
Big-K's Avatar
Distinguished Member with 6,883 posts.
 
Join Date: Nov 2003
Location: Kansas
Experience: Advanced
14-Jun-2007, 07:50 PM #2
well, i notice you didn't close your keywords or description meta tags.
pcpro17's Avatar
Senior Member with 233 posts.
 
Join Date: Oct 2006
Location: Wisconsin, USA
Experience: Advanced
15-Jun-2007, 10:33 AM #3
I thought meta (<meta>) tags didn't need to be closed (</meta>). Is this something FireFox and Netscape are particular about?
Big-K's Avatar
Distinguished Member with 6,883 posts.
 
Join Date: Nov 2003
Location: Kansas
Experience: Advanced
15-Jun-2007, 10:50 AM #4
it might be, i don't see any other problems, myself.
brendandonhu's Avatar
Distinguished Member with 15,988 posts.
 
Join Date: Jul 2002
Location: Ann Arbor, MI
Experience: Advanced
15-Jun-2007, 12:21 PM #5
Sounds like a content type problem. Try creating a file called .htaccess in that folder, with this in it:
Code:
AddType text/css .css
pcpro17's Avatar
Senior Member with 233 posts.
 
Join Date: Oct 2006
Location: Wisconsin, USA
Experience: Advanced
15-Jun-2007, 12:30 PM #6
Hello Brendan. I added the line to my .htaccess file. However, I won't have a chance to look at the site with FireFox or Netscape until later this evening. If you have a chance, I would really appreciate it, if you could let me know if either of those browsers is now rendering the CSS. Thanks.
pcpro17's Avatar
Senior Member with 233 posts.
 
Join Date: Oct 2006
Location: Wisconsin, USA
Experience: Advanced
15-Jun-2007, 12:44 PM #7
Nevermind. That line blew away the PHP scripting capability I have setup. Here is my current .htaccess file:
Code:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

Options -Indexes
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?correctnesscommentary\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(jpe?g|gif|bmp|png)$ - [F]
AddType application/x-httpd-php .css [NC]
Where/How do you suggest that I add the line of code that you suggested? Thanks.
brendandonhu's Avatar
Distinguished Member with 15,988 posts.
 
Join Date: Jul 2002
Location: Ann Arbor, MI
Experience: Advanced
15-Jun-2007, 01:07 PM #8
Ah, it looks like you're running PHP in your CSS file. Try adding this to the beginning of the CSS file:
PHP Code:
<?php header('Content-Type: text/css'); ?>
pcpro17's Avatar
Senior Member with 233 posts.
 
Join Date: Oct 2006
Location: Wisconsin, USA
Experience: Advanced
15-Jun-2007, 04:54 PM #9
Thanks, but what does the header function do? Is it part of the standard PHP library?
brendandonhu's Avatar
Distinguished Member with 15,988 posts.
 
Join Date: Jul 2002
Location: Ann Arbor, MI
Experience: Advanced
15-Jun-2007, 04:56 PM #10
Yes, you can find it in the manual: http://php.net/header
MMJ's Avatar
MMJ MMJ is offline
Distinguished Member with 3,208 posts.
 
Join Date: Oct 2006
16-Jun-2007, 07:26 AM #11
Quote:
Originally Posted by pcpro17
I thought meta (<meta>) tags didn't need to be closed (</meta>). Is this something FireFox and Netscape are particular about?
close it like this.

<meta />

similar to

<br />
<input />
<img />

These tags are self closing.
brendandonhu's Avatar
Distinguished Member with 15,988 posts.
 
Join Date: Jul 2002
Location: Ann Arbor, MI
Experience: Advanced
16-Jun-2007, 09:11 AM #12
It already has that.
MMJ's Avatar
MMJ MMJ is offline
Distinguished Member with 3,208 posts.
 
Join Date: Oct 2006
16-Jun-2007, 09:57 AM #13
Quote:
Originally Posted by brendandonhu
It already has that.
Quote:
Originally Posted by pcpro17
I thought meta (<meta>) tags didn't need to be closed (</meta>).
Every tag needs to be closed.

I realize that he had them closed but was explaining to him.
Shadow2531's Avatar
Distinguished Member with 2,629 posts.
 
Join Date: Apr 2001
16-Jun-2007, 04:47 PM #14
Quote:
Originally Posted by pcpro17
Thanks, but what does the header function do? Is it part of the standard PHP library?
In the code Brendan gave you, it tells the server to send style.css as a css file (text/css). Currently, style.css is being sent as text/html (an html file), which causes Firefox to ignore it.

A .css extension on the server does not necessarily mean a css file. What mime type it's sent with determines the type of file it is.

You definitely need to fix this as future versions of IE and Opera for example may start to ignore the style sheet like Firefox.
__________________
10 ? "a line as the unending horizon"
20 ? "a curve as the rolling hillside"
30 ? "a point as a distant bird"
40 ? "a ray as the rising sun"
run
pcpro17's Avatar
Senior Member with 233 posts.
 
Join Date: Oct 2006
Location: Wisconsin, USA
Experience: Advanced
18-Jun-2007, 10:57 AM #15
Thanks, Shadow. I think it is fixed now. I'll be sure to confirm this when I get home tonight and can test it from the browsers in question.
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are Off
Refbacks are Off

You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 12:31 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.