12, October 2008

using external css file - webmaster forum

 
Webdigity webmaster forums
This forum shares its ad revenue with its members!
[ 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

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


It's time to use PHP5!


« on: Apr 07, 2006, 12:55:10 PM »

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 Visit through proxy

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



Last blog : Upload images for usage in TinyMCE
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 8119
41671 credits
Members referred : 3



« Reply #1 on: Apr 07, 2006, 12:59:26 PM »

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 Visit through proxy

Last blog : Free Unlimited Bandwith and disk space to good to be true?
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6349
38918 credits
Members referred : 374


It's time to use PHP5!


« Reply #2 on: Apr 07, 2006, 01: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


Last blog : Upload images for usage in TinyMCE
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 8119
41671 credits
Members referred : 3



« Reply #3 on: Apr 07, 2006, 01: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 Visit through proxy

Last blog : Free Unlimited Bandwith and disk space to good to be true?
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6349
38918 credits
Members referred : 374


It's time to use PHP5!


« Reply #4 on: Apr 07, 2006, 01: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 ;-)


Last blog : Upload images for usage in TinyMCE
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 8119
41671 credits
Members referred : 3



« Reply #5 on: Apr 07, 2006, 01:16:51 PM »

Nevermind Smiley

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy

Last blog : Free Unlimited Bandwith and disk space to good to be true?
Global Moderator
Internet Junkie
*****
Gender: Male
Posts: 1523
6847 credits
Members referred : 8


Gimme all your cookies!!!


« Reply #6 on: Apr 07, 2006, 06: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 : Site of the Month - August 2007
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6349
38918 credits
Members referred : 374


It's time to use PHP5!


« Reply #7 on: Apr 07, 2006, 06: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">


Last blog : Upload images for usage in TinyMCE
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 8119
41671 credits
Members referred : 3



« Reply #8 on: Apr 07, 2006, 06: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 Visit through proxy

Last blog : Free Unlimited Bandwith and disk space to good to be true?
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6349
38918 credits
Members referred : 374


It's time to use PHP5!


« Reply #9 on: Apr 07, 2006, 06: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...


Last blog : Upload images for usage in TinyMCE
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 8119
41671 credits
Members referred : 3



« Reply #10 on: Apr 07, 2006, 06: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 Visit through proxy

Last blog : Free Unlimited Bandwith and disk space to good to be true?
Bill Gates is my home boy
*****
Gender: Female
Posts: 622
3877 credits
Members referred : 2



« Reply #11 on: Apr 07, 2006, 08: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 Visit through proxy, providing online content and printed marketing materials.
www.helpforwebbeginners.com Visit through proxy, Tutorials and how to's for new  webmasters.
www.CraftyTips.com Visit through proxy, a unique Arts & Crafts Directory
www.nocans.com Visit through proxy - Pet Food Recipe Site
www.petsiteguides.com Visit through proxy - A New Pet Directory

Last blog : Back to Crafting
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 8119
41671 credits
Members referred : 3



« Reply #12 on: Apr 07, 2006, 08: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 Visit through proxy

Last blog : Free Unlimited Bandwith and disk space to good to be true?
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6349
38918 credits
Members referred : 374


It's time to use PHP5!


« Reply #13 on: Apr 07, 2006, 11:04:27 PM »



Last blog : Upload images for usage in TinyMCE
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 8119
41671 credits
Members referred : 3



« Reply #14 on: Apr 08, 2006, 12:21:59 PM »

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 Visit through proxy

Last blog : Free Unlimited Bandwith and disk space to good to be true?
Global Moderator
Internet Junkie
*****
Gender: Male
Posts: 1523
6847 credits
Members referred : 8


Gimme all your cookies!!!


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

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


Last blog : Site of the Month - August 2007
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6349
38918 credits
Members referred : 374


It's time to use PHP5!


« Reply #16 on: Apr 08, 2006, 04: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...


Last blog : Upload images for usage in TinyMCE
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....

Topic sponsors:
Get a permanent link here for $1.99!


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?
Oct 12, 2008, 09:04:35 PM





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!


Forum Statistics
Total Posts: 36.924
Total Topics: 7.559
Total Members: 4.152
Tutorials : 56
Resources : 143
Designs : 220
Latest Member: applemobile

25 Guests, 4 Users online :

11 users online today:



Readers

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