Post Reply  Post Thread 
CSS
Author Message
Nurfina
Junior Member
**


Posts: 2
Group: Registered
Joined: Aug 2008
Status: Offline
Post: #1
CSS

Hey guys, sorry if this annoys anyone if it does please feel free to delete it

But I was wondering if it is possible to use external CSS files that are saved on, well on the file handler, I ask simply because I tried and the system didn't recognize the file type .css

08-03-2008 08:07 PM
Find all posts by this user Quote this message in a reply
Martin E. Meserve
Administrator
*******


Posts: 142
Group: Administrators
Joined: Mar 2008
Status: Offline

Post: #2
RE: CSS

I'm not sure why you would think your question would annoy anyone. This new forum is not very active yet, but this is the place to ask questions.

When you refer to the "system", it's unclear what your talking about. Except for some of the restricted file types for free sited, the server really doesn't care what your file is. The server is only there to store your web pages and support files, and then pass them on to your visitors. The interpretation of those pages then depends on the visitor's browser. If your viewing your own site, then that's your browser.

Even on free sites, CSS files are allowed. They don't even have to have a ".css" extension. As long as the form of the file is correct, and it is linked properly in your web pages, you could give it a ".xyz" extension and it would still work. So the file must first exist on your web site. From your posting, I will assume that you have already uploaded it.

The CSS file should not contain any <style type="text/css"> and </style> tags. If they are there, they will serve to disable the CSS file. All the file should contain is style definitions.

Finally, just existing on your web site is not enough. The CSS file needs to be linked from your HTML page(s). Below is an example of a link tag that needs to be in your HTML file(s), between the <head> and </head> tags.

Code:
<head>
<title>Yadada Yadada Yadada</title>
<link rel=stylesheet type="text/css" href="my_style.css">
</head>


The above code assumes that the "my_style.css" file is in the same folder as the HTML page that requires it. If it's in another folder, that needs to be specified in the <link> tag. An example is below.

Code:
<head>
<title>Yadada Yadada Yadada</title>
<link rel=stylesheet type="text/css" href="another_folder/my_style.css">
</head>


A quick way to see if your pages are reading your CSS file, is to take your web site URL and append the reference to the style sheet that is in the <link> tag. So if your URL was "mywebsite.com", and the link was like the example above, you could use "mywebsite.com/another_folder/my_style.css" in the address bar of your browser. If the file exists, and is specified correctly in the <link> tag, you will see the text of your CSS file. If you don't see it, there is a problem with the "href" in the link. This could be either spelling, upper/lower case differences, incorrect folder reference, etc...


Martin E. Meserve
http://www.k7mem.com
[ p.s. If you have a question about your web site, please include your web site URL in your posts. ]
08-04-2008 07:15 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Nurfina
Junior Member
**


Posts: 2
Group: Registered
Joined: Aug 2008
Status: Offline
Post: #3
RE: CSS

Thanks Martin that what I was wondering and you have answered that, by "the system" I ment the server Smile sorry for being unclear

08-05-2008 06:15 AM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: