28, May 2012

using external css file - webmaster forum

 
Webdigity webmaster forums
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Design and Layout  >  Web Page Design  >  CSS (Moderator: Meth0d)
Topic: using external css file
« previous next »
Pages: [1] Print
Instabuck - The easy way to sell digital products online

Author Topic: using external css file  (Read 3650 times)
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« on: Apr 07, 2006, 11:55:10 am »

Hello,

I'm using this code to import my css file into a document:
Code:
<style type="text/css">
<!--
@import url("/includes/final.css");
-->
</style>

the CSS and HTML works perfect, this is not the problem.

I'm using a custom 404 error file that sends me an mail about every error. No problem with this...

If the visitor stores the website on his desktop (save as...) and open the page later for reading I get a error like this:

http://www.finalwebsites.com/PHP%20Resource%20site%20%20PHP%20scrips%20en%20informatie%20voor%20web%20developer_files/final.css

is there a way to call this css file on a way that there no error occurred?


I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5799
46391 credits
Members referred : 3



« Reply #1 on: Apr 07, 2006, 11:59:26 am »

Well a solution could be this :

Code:
<style type="text/css">
<!--
@import url("http://www.finalwebsites.com/includes/final.css");
-->
</style>

Offtopic : Topic moved to the CSS board

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #2 on: Apr 07, 2006, 12:02:17 pm »

 
Well a solution could be this :

Code:
<style type="text/css">
<!--
@import url("http://www.finalwebsites.com/includes/final.css");
-->
</style>
[quote][/quote]

This is a solution I know, but is this the best way to import css files? never saw this before...

Maybe it's better to have this file in the root?

Olaf

PS. Nikolas, why do you moved this thread? it's about CSS and HTML

I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5799
46391 credits
Members referred : 3



« Reply #3 on: Apr 07, 2006, 12:07:07 pm »

Well maybe it is not the best, but I wont think that you have any problem with that.

Another solution is moving the file to the root directory, or use something like "./includes/....." but this propably wont solve anything here.

Quote
PS. Nikolas, why do you moved this thread? it's about CSS and HTML

I think it is more about CSS. If you don't agree you can move it back Wink

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #4 on: Apr 07, 2006, 12:10:39 pm »


Quote

I think it is more about CSS. If you don't agree you can move it back Wink

hmm... "import" is a CSS command but the 404 error is server related ;-)

I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5799
46391 credits
Members referred : 3



« Reply #5 on: Apr 07, 2006, 12:16:51 pm »

Nevermind Smiley

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
Global Moderator
Internet Junkie
*****
Gender: Male
Posts: 1525
6359 credits
Members referred : 8


Gimme all your cookies!!!


« Reply #6 on: Apr 07, 2006, 05:08:54 pm »

I use the same script to import and I think that the only way you are going to solve this one is by doing what Nick said. I would be interested to know if there was another way...


Last blog : Canonical URL Links / Tags
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #7 on: Apr 07, 2006, 05:15:19 pm »

I will try the CSS file in the root first, strange is that a .js file get's a link thats OK
maybe we have to use a diff. tag like:

<link href="/bt_new.css" rel="stylesheet" type="text/css">

I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5799
46391 credits
Members referred : 3



« Reply #8 on: Apr 07, 2006, 05:15:50 pm »

BTW I have seen this implementation a lot of times, but I haven't realized yet why to do this and not use a

<link rel="stylesheet" .....

tag insted?

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #9 on: Apr 07, 2006, 05:18:54 pm »

BTW I have seen this implementation a lot of times, but I haven't realized yet why to do this and not use a

<link rel="stylesheet" .....

tag insted?
the import function is adviced by a lot of css resources...

I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5799
46391 credits
Members referred : 3



« Reply #10 on: Apr 07, 2006, 05:22:44 pm »

I know that.

What I don't know is the reason Sad

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
Bill Gates is my home boy
*****
Gender: Female
Posts: 710
4449 credits
Members referred : 2



« Reply #11 on: Apr 07, 2006, 07:36:31 pm »

I would be curious as to the reason too.

Maybe it is so people can't download your site and use it offline?

www.yourmessageconsultant.com, providing online content and printed marketing materials.
www.helpforwebbeginners.com, Tutorials and how to's for new  webmasters.
www.CraftyTips.com, a unique Arts & Crafts Directory
www.nocans.com - Pet Food Recipe Site
www.petsiteguides.com - A New Pet Directory

Last blog : Spring Cleaning at Crafty Tips
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5799
46391 credits
Members referred : 3



« Reply #12 on: Apr 07, 2006, 07:42:22 pm »

Quote
Maybe it is so people can't download your site and use it offline?

I don't think that this is the reason. It must be something with backward compatibillity (for CSS 2) or optimazation.

Hope someone can tell us the real reason, because this thread starts to look like a web design quiz Tongue

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #13 on: Apr 07, 2006, 10:04:27 pm »


I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5799
46391 credits
Members referred : 3



« Reply #14 on: Apr 08, 2006, 11:21:59 am »

Thanks for this Olaf Smiley

So the reason is to make older browsers not to read the CSS.

I guess it is good, but who is using Netscape 4 in our days?

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
Global Moderator
Internet Junkie
*****
Gender: Male
Posts: 1525
6359 credits
Members referred : 8


Gimme all your cookies!!!


« Reply #15 on: Apr 08, 2006, 03:04:44 pm »

At least you have the reason! Serves them right for still using Netscape 4! lol


Last blog : Canonical URL Links / Tags
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #16 on: Apr 08, 2006, 03:09:50 pm »

At least you have the reason! Serves them right for still using Netscape 4! lol

yes writing code for old browsers will keap the problem Cheesy

but don't forget people with old computer and without knowledge to update a browser, but you are right...

Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=2203
Tags : design css html browsers email Bookmark this thread : Digg Del.icio.us Dzone more....

Pages: [1] Print 
Webdigity Webmaster Forums  >  Design and Layout  >  Web Page Design  >  CSS (Moderator: Meth0d)
Topic: using external css file
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 11:18:48 am





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!






Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2012 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.