Re: I know HTML, I know CSS - So why can't I select some text and apply a style to it?

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Kathleen Anderson [MVP - FrontPage] (spiderwebwoman_at_mvps.org)
Date: 10/28/04


Date: Thu, 28 Oct 2004 11:07:19 -0400

Paul:
Before you try and apply a style to an anchor, which is what the <a> tag
represents, you need to properly format the tag; like this:

<p> HTML 4.01 Specification</p>

Your anchor has no href.

-- 
~ Kathleen Anderson
Microsoft FrontPage MVP
Spider Web Woman Designs
http://www.spiderwebwoman.com/resources/
Paul H <paul@nospamthanks.com> wrote:
> What I am trying to achieve is to turn "only" the bold text into
> bold/italic...
>
> Here's my code:
>
> <body>
> <a class="body_bold">Hello World - in bold</a>
> <br><br>
> <a class="body_italic">Hello World - in italic</a>
> </body>
>
> In normal mode I click on the opening <a> tag for the "Hello World -
> in bold" line which selects the text and the tags for the first line
> only. From the pull down style menu I select "body_bold_italic".
>
> Here is the resulting code:
>
> <p class="body_bold_italic">
> <a class="body_bold">Hello World - in bold</a>
> <br><br>
> <a class="body_italic">Hello World - in italic</a> </p>
> </body>
>
> Why has the whole lot been wrapped in a <p> tag? I only selected the
> first line!
>
> The code I was expecting to see was:
>
> <body>
> <a class="body_bold_italic">Hello World - in bold</a>
> <br><br>
> <a class="body_italic">Hello World - in italic</a>
> </body>
>
> What am I missing?
>
> Thanks Kathleen,
>
> Paul
>
>
>
> "Kathleen Anderson [MVP - FrontPage]" <spiderwebwoman@mvps.org> wrote
> in message news:upmqJyOvEHA.1300@TK2MSFTNGP14.phx.gbl...
>> <a> is not a style, it's an HTML tag. You have to add the <a> tag in
>> the HTML first, then select your <a> tag style from the dropdown.
>>
>> --
>>
>> ~ Kathleen Anderson
>> Microsoft FrontPage MVP
>> Spider Web Woman Designs
>> http://www.spiderwebwoman.com/resources/
>>
>>
>>
>> Paul H <paul@nospamthanks.com> wrote:
>>> Thanks Kathleen!!
>>>
>>> If I highlight a piece of text and then select a style from the
>>> style dropdown, the code that is inserted is:
>>> <p class="body_bold">
>>> But I want
>>> <a class="body_bold">
>>> Because I don't want the entire page wrapped in a <p> tag. I just
>>> want the text I have selected wrapped in an <a> tag.
>>>
>>> What am I doing wrong?
>>>
>>> Regards,
>>>
>>> Paul
>>>
>>>
>>>
>>>> I believe Ravi is referring to the style dropdown as shown in the
>>>> attached image.
>>>>
>>>> --
>>>>
>>>> ~ Kathleen Anderson
>>>> Microsoft FrontPage MVP
>>>> Spider Web Woman Designs
>>>> http://www.spiderwebwoman.com/resources/
>>>>
>>>>
>>>>
>>>> Murray <forums@HAHAgreat-web-sights.com> wrote:
>>>>> Here's the tag selector (see snap).  But I can see no Class
>>>>> dropdown in the properties panel.  I would be very interested in
>>>>> knowing this answer myself.
>>>>>
>>>>>
>>>>> "Paul H" <paul@nospamthanks.com> wrote in message
>>>>> news:6F3gd.211$vx1.86@newsfe6-gui.ntli.net...
>>>>>> Thanks Ravi, but I can't find the menu options you mention. If I
>>>>>> select "View" I can see "Reveal Tags" but no "Quick tag
>>>>>> selector". Also I have three modes "normal", "HTML" and
>>>>>> "Preview", no "design" mode.
>>>>>>
>>>>>> So when you mention "In the design mode on the top.. " I have no
>>>>>> idea where
>>>>>> you mean.
>>>>>>
>>>>>> I am very grateful for your help, but I am no closer to solving
>>>>>> this. Please
>>>>>> could you re-word your explanation if it's not too much trouble.
>>>>>>
>>>>>> Many thanks,
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> Paul
>>>>>>
>>>>>>
>>>>>> "Ravi Anguluri" <raviangu@online.microsoft.com> wrote in message
>>>>>> news:0lHWV2HvEHA.3152@cpmsftngxa10.phx.gbl...
>>>>>>> Open FrontPage From the menu View --> Quick Tag selector.
>>>>>>> In the design mode on the top you will find the tags specific to
>>>>>>> the text selected. Click on the tag and on the down arrow. Then
>>>>>>> select Tag Properties. In the Window if you find class drop down
>>>>>>> box, select the required class to apply to the selected text. or
>>>>>>> right click on the text select the properties.
>>>>>>>
>>>>>>> There are some HTML tags which do not support all the properties
>>>>>>> for example the Class property. You can check at
>>>>>>> http://www.w3.org for the tags
>>>>>>> and properties supported
>>>>>>>
>>>>>>> Hope this Information helps.
>>>>>>>
>>>>>>> Regards
>>>>>>> Ravi
>>>>>>> MSFT
>>>>>>>
>>>>>>> This posting is provided "as is" with no warranties and confers
>>>>>>> no rights


Relevant Pages