[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.frontpage.programming

How to insert Class CSS onto text

groups

4/10/2004 8:03:00 PM

How do I insert a class CSS onto various groupings of text? The only
way I can get it to work is to insert it into the code, but can't
FrontPae let me insert it? The text pieces are various headings to
highlight the content of the text. The text is not in a table or
cell. So far, I highlight the text and go to Format --> Style, I
enter the class, then select it and click ok. The class is created on
the page, but the class is never applied to anything I select.

For example, I created a class called "purpletext" on this page
http://healthyresult.org/p_ca... and applied it to the large
heading "Immunotec with Pure Milk Calcium". After applying it, the
text remains black.

Also, do classes have to be re-created on each page? I created a
class on another page and it doesn't show up when I switch to a
different page in the same web. I thought the purpose of a class was
that it could apply to different elements on different pages of the
site?
5 Answers

Steve Easton

4/10/2004 8:44:00 PM

0

The class you created is named purpletest not purpletext.

For what you are trying to do, simply highlight the text and then right
click, select Font and select the font color.

For a css class to work the class name has to be assigned the html element
you are applying it to.

For a class to work on more than one page, it needs to be created in an
external style sheet which is applied across the web. Then the class needs
to be assigned to every element you want it to work in, using
class="classname" without the leading period.
The leading period is only used to identify the class name in a style sheet
or style script.


--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer

"Mary" <groups@flamepointcat.com> wrote in message
news:9602720.0404101202.1e5d7f7@posting.google.com...
> How do I insert a class CSS onto various groupings of text? The only
> way I can get it to work is to insert it into the code, but can't
> FrontPae let me insert it? The text pieces are various headings to
> highlight the content of the text. The text is not in a table or
> cell. So far, I highlight the text and go to Format --> Style, I
> enter the class, then select it and click ok. The class is created on
> the page, but the class is never applied to anything I select.
>
> For example, I created a class called "purpletext" on this page
> http://healthyresult.org/p_ca... and applied it to the large
> heading "Immunotec with Pure Milk Calcium". After applying it, the
> text remains black.
>
> Also, do classes have to be re-created on each page? I created a
> class on another page and it doesn't show up when I switch to a
> different page in the same web. I thought the purpose of a class was
> that it could apply to different elements on different pages of the
> site?


Greg Chagnon

4/11/2004 10:51:00 AM

0

Hi Mary,

In FP select the text that you wish to apply the CSS Style to, switch to Code/HTML view, enclose the text you wish to apply a CSS
style to with:
<span class="selectorName">The selected text</span> where "selectorName" is the name of the CSS selector

Using FP Format Style you can then select the selector name and apply any styles you wish.

--
Mike -- FrontPage MVP '97-'02
http://www.websunl...
Stop Spam Email Mining from your web pages with SpamStopper
http://www.websunl.../order/product/SpamStopper/spam_stopper_help_dir.htm
FrontPage Add-ins Since '97 2003 / 2002 / 2000 Compatible

"Mary" <groups@flamepointcat.com> wrote in message news:9602720.0404101202.1e5d7f7@posting.google.com...
> How do I insert a class CSS onto various groupings of text? The only
> way I can get it to work is to insert it into the code, but can't
> FrontPae let me insert it? The text pieces are various headings to
> highlight the content of the text. The text is not in a table or
> cell. So far, I highlight the text and go to Format --> Style, I
> enter the class, then select it and click ok. The class is created on
> the page, but the class is never applied to anything I select.
>
> For example, I created a class called "purpletext" on this page
> http://healthyresult.org/p_ca... and applied it to the large
> heading "Immunotec with Pure Milk Calcium". After applying it, the
> text remains black.
>
> Also, do classes have to be re-created on each page? I created a
> class on another page and it doesn't show up when I switch to a
> different page in the same web. I thought the purpose of a class was
> that it could apply to different elements on different pages of the
> site?


groups

4/11/2004 7:29:00 PM

0

Hi Mike,
Is there any way to apply the class without entering code view?
Shouldn't FP be able insert the class inside the <p> tag where it is
applied without entering it by hand? Technically, I was told to avoid
the <span> tags as much as possible.
Mary

Greg Chagnon

4/11/2004 11:25:00 PM

0

You can create the class in the <p> tag but then you have a paragraph. There is nothing wrong with using span tags.

--
Mike -- FrontPage MVP '97 - '02
http://www.websunl...


"Mary" <groups@flamepointcat.com> wrote in message news:9602720.0404111129.47af7072@posting.google.com...
> Hi Mike,
> Is there any way to apply the class without entering code view?
> Shouldn't FP be able insert the class inside the <p> tag where it is
> applied without entering it by hand? Technically, I was told to avoid
> the <span> tags as much as possible.
> Mary


=?Utf-8?B?cm9kY2hhcg==?=

4/15/2004 5:53:00 PM

0

The first thing I would do is create the external CSS
stylesheet and place all the different styles you want and
name them with clarity e.g., (h1.large
{color:purple;font-size:15pt;} (header tag that's purple
and 15 points in size) and name the CSS (mysite.css) Then,
in FP, go to the HTML view, and in the <head> </head>
section, create the following line:
<link rel="stylesheet" href="mysite.css" type="text/css" />
Note: the path for href="mysite.css" must be correct. Then
in the <body> section, where you want the particular style
to show up, you would call the particular class. In the
about example for <h1>, it would be:
<h1 class="large">askdjfalsdfjalsdjfalkdsf</h1> Now, the
<h1> will be 15pts and purple. You can call any class
within a tag.

>-----Original Message-----
>How do I insert a class CSS onto various groupings of
text? The only
>way I can get it to work is to insert it into the code,
but can't
>FrontPae let me insert it? The text pieces are various
headings to
>highlight the content of the text. The text is not in a
table or
>cell. So far, I highlight the text and go to Format -->
Style, I
>enter the class, then select it and click ok. The class
is created on
>the page, but the class is never applied to anything I select.
>
>For example, I created a class called "purpletext" on this
page
>http://healthyresult.org/p_ca... and applied it to
the large
>heading "Immunotec with Pure Milk Calcium". After
applying it, the
>text remains black.
>
>Also, do classes have to be re-created on each page? I
created a
>class on another page and it doesn't show up when I switch
to a
>different page in the same web. I thought the purpose of
a class was
>that it could apply to different elements on different
pages of the
>site?
>.
>