How can I not know this? - Post ID 5299

User 446149 Photo


Registered User
3 posts

I give up. I've searched all over and can't find how to insert a style. I'm using the registered version of the editor. I have the css file in the same directory, and it is attached as follows:

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

inside the head. Doctype is 1.0 Transitional.

I can't find a way to simply apply one of the styles in the abmedia.css file to the file I'm editing. What am I missing? Stylesheet wizard doesn't do that -- it's just for making new styles. I HAVE MY STYLES -- I just want to apply them.
User 122279 Photo


Senior Advisor
14,547 posts

<LINK REL=StyleSheet HREF="abmedia.css" TYPE="text/css" MEDIA=screen> should do the trick. You have to remove the "" around the word stylesheet.
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 37670 Photo


Registered User
2,138 posts

Any chance you can upload the file and the style sheet and then post a link so we can have a look at it? There are many ways that work, and some that don't.
I have this:
<link rel="stylesheet" href="tdg_style.css" type="text/css">
Notice I too have "" around the word stylesheet, and it does work that way. Chances are, there is an error in either the style sheet or the tags being used on the web page. If they don't match, the styles won't apply. Without seeing both the page and the style sheet code, there's really no way of knowing what's causing the problem.

Also, can you please clarify the doctype?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
That will work, but if your doctype is HTML 1.0, not XHTML, then it's too old a doctype to support style sheets, no matter how well written they are.
E-Learning Specialist
www.mainsites.ca is my website, and yes, some of it is crappy.
User 446149 Photo


Registered User
3 posts

I'm not sure I'm communicating the situation well. I can put the CSS tags in manually. They look right on the screen. They look fine on the server. The styles are exactly as intended.

(The quotes did need to be removed, and I did that.)

But my issue is that I can't find a button on the screen that says, "Select style" or something on that order. It's as simple as that.

I mean look, you hit the P button and get the <p> </p>, right?

But what button/icon/command do I use to get this:

<p class="main"> </p>?

I've right clicked, tried every command on every menu I can find. I can't locate anything about stylesheets except the stylesheet wizard and stylesheet attribute wizard, both of which are fine for establishing/creating/modifying styles but not for SELECTING STYLES THAT ALREADY EXIST.
(Pardon the caps.)

Also, where is the button that says "attach stylesheet." I've never seen an HTML editor without one. (Well, not in recent years.)

It's not about doctypes or new vs. old documents. I created a new "quick start" and still don't see these buttons.

thanks in advance for your help.

Carl
User 37670 Photo


Registered User
2,138 posts

What version are you using? The 2008 version should be out soon, and it will have a little more options for doing this. In the 2008 version, when you type in <p and the space bar, you get a list of things. Amoung that list is "class", but I think that you would still need to know the name of the class element you are trying to use.
I have never looked for an "attach stylesheet" button. Don't know if there is one.
E-Learning Specialist
www.mainsites.ca is my website, and yes, some of it is crappy.
User 355448 Photo


Ambassador
3,144 posts

With the 2007 HTML Editor, look on the left side for a tab labeled tags.

Click on the tags tab, scroll down to the <p></p> tag, and double click it. Now the cursor is between the open and close tags, and you have opened a menu that has class="" and style="" and if you double click on of those, you will have the added entry with the cursor between the quotes. If you are adding a class, just enter the name of the class, and move down to enter your text.

It is not all automatic, but it saves a lot of time.

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.