Solved

no css on first load of site

Posted on 2008-11-03
5
195 Views
Last Modified: 2012-05-05
So i am working with a team that have a site that is going to be rolled out soon.

I went to view the site for the first time on firefow3 on my mac and the home page loaded but it looked like the CSS was not loaded.

I refreshed the page and all worked fine.

I am worried that this has happened to a few peope and that this could happen when the site goes live.

Has anyone else seen simular situations like this and how have you solved it?

Also is there a way i can recreaet going to the site for the first tme as i have create the FF cache and it seems ok, but if i go t a virgin machine and hit the home page i see the problem.

W

0
Comment
Question by:willa666
5 Comments
 
LVL 7

Expert Comment

by:Valleriani
Comment Utility
I know there was a bug in IE6 that causes this. But after updating IE6 it will solve this issue. Normally if it is IE6, you should be updating to IE7 anyways.

Are you seeing this on another browser? Perhaps a link would help so we can check it out. If your issue is in IE6, this was a bug by them, and was solved, but you'd need a up to date IE6.
0
 
LVL 6

Expert Comment

by:trickyidiot
Comment Utility
Valleriani: The user specified this is an issue with FireFox - not IE.

Willa666: Can you include a link or  code snippet so we can see how you are referencing your CSS file?
0
 
LVL 44

Accepted Solution

by:
scrathcyboy earned 500 total points
Comment Utility
To solve the issue on firefox not refreshing, simply look into Tools -> Options or Preferences, find out where FF is saving the cached data, close Firefox, and delete all files in that cached directory, then restart FF, and you will see the same issue crop up as if you first visited the site.

This kind of problem usually happens when the PATH to the CSS file is not specified correctly.  Say it is in a folder called "css" under the WWW root directory, then your path to the default.css is this --

<LINK rel="stylesheet" type="text/css" href="css/default.css">

No preceding dots or slashes, and DO NOT USE backslashes -- that is a microsoft quirk, the rest of web browsers use FORWARD slashes -- as in unix /this/path/to/your/file -- NEVER backslashes.  

That will almost certainly solve it -- if not, put all the CSS in the HEAD of the document to test, when you see FF is rendering it fine, you will realize it is either an ERROR in the CSS file, or a bad-formed path.
0
 
LVL 1

Author Comment

by:willa666
Comment Utility
Hi scrathcyboy

I will give that a try today, fingers crossed, touch wood, etc etc :)

Ww

0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

When applying CSS to your HTML, there are many different ways to select which element(s) the CSS applies to.  Some of these selectors are more commonly known and used than others - Here are the more common ones: #X - Matches an ID of X .X - Matche…
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now