Solved

no css on first load of site

Posted on 2008-11-03
5
202 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
ID: 22867456
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
ID: 22867935
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
ID: 22872933
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
ID: 22874302
Hi scrathcyboy

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

Ww

0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Creating a CSS block that only applies to printing By default, all of your CSS applies to every possible view of your page - whether on screen, printed, landscape, touch-screen, or whatever.  You can, however, add CSS that only applies under certai…
This is a how to build your own CSS3 slideshow and when I say CSS3 I mean just CSS with no javascript in sight! There a few examples online of how to do this but most just show you an example without any explanation, others make it more complicat…
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …

778 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