External CSS?

User 117947 Photo


Registered User
2 posts

Is it possible, with the HTML Editor, to create an external style sheet for an HTML page I am developing?
User 471275 Photo


Ambassador
1,130 posts

Yes, you can. Just use the tags tab on the left hand side and chose the css option where you will find all the css codes.
:)

User 117947 Photo


Registered User
2 posts

No. (not as I see it, at least.) That's how I get internal style sheet blocks within my HTML page. What I want is a separate page called something like mypage.css.
User 355448 Photo


Ambassador
3,144 posts

Alan,

I think you did not understand the answer.

You can start a new page, and delete all the html. Now you have an empty page.

Start the page with something that will remind you that this is a css page for a specific purpose, such as your site, the defaults you always want, or a print/no print css.

Then used the tags add99wd told you about to build your css page. Save this as something like print.css (for a print style sheet) or mysite.css for your site general css.

I have a print.css that looks like this:

@charset "utf-8";
/* CSS Document */
body {
color : #000000;
background : #ffffff;
font-family : "Times New Roman", Times, serif;
font-size : 12pt;
}
a {
text-decoration : underline;
color : #0000ff;
}
#nav, #weather, #footer {
display : none;
}


This external CSS was created using the HTML Editor.

Then in the head section of my pages, I have a line that links to this style sheet.

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

Does this explain what you want to know?
User 117361 Photo


Ambassador
6,076 posts

The more you can add to an external css file - or a javascript file, the happier you will be in the long run. It saves SO much time to be able to edit just one file which carries changes through your entire site!

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.