Hello.

Currently I am using XP and I wanted to save a CSS-file, yet I cannot save it correctly which results in the fact that I cannot properly link to it, meaning that every style I try, will not be accomplished. Can anyone help me? I'm grateful for any reply.. :)

CSS files use the file extension .css and you may use a notepad to create/edit this file.

Try typing this on a notepad:

body { background-color: red; }

..and save it as mystyle.css

Then on your html file, use the code below to reference/link to your css file:

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

Of course, both of your html and css must be in the same folder.

Hope this helps. :)

Thanks for your fast reply. I did though. Yet it doesn't work, dunno what's wrong. The file as you look at it doesn't give any notification about what kind of file it is, not even the html-file, though that one just works fine. But I can never tell, if it is html. However the point is that I cannot link to my CSS.. :/

so post your code so we can look at it.
you might need to also do the following:
change this <link rel="stylesheet" type="text/css" href="mystyle.css" />
to this <link rel="stylesheet" type="text/css" href="../mystyle.css" />

Well, I was able to figure out what was wrong, it was something as to the system, I just had to adjust things, it was not my computer though. Anyways I made it, I could style everything. :) Thank you guys though. :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.