How to create a class without writing in source view ?

Hello ladies and gentlemen,

I'm trying to understand how to create a class using only the formatted view. And I've succeeded to understand howto solve this. However, as I found it difficult to understand, I post this for any other people, and maybe, for people who would like to get inspiration involving the understanding for beginners of Amaya Style Sheet Howto document.


The brilliant Amaya Style Sheet HowTo document ( http://www.w3.org/Amaya/User/doc/StyleSheets.html ) explains we should first create a style for the element using Style Format, and then, Apply Rule (both using F2 key to select element).
This works fine. However, I've tried to understand how to create an additive class name to the selected element.
I explain:
	1. Open a new document, empty, and then write a paragraph with text.

	2. I've a <p> element. I select with F2. I go to Format -> Style Editor, and apply a red color style. Then Amaya generate:
	*  <p style="color: red;">
	3. Then I select this element again using F2 key. And I go to Tools -> Apply Rule. A box appear "use as a class", "select a class". In the window, I can select the "p" element. However, as I wish to call the class "rouge", how can I do, in order to get a p.rouge rule ?
The answer is very simple: 

	* being at stage 3 above, just choose "p" element, and type .rouge just after. Then you will have on the bottom line of this use a class" window this: p.rouge
	* and then confirm
This will create an embedded rule "p.rouge", located at top part of source view document, in style portion of head part.

Instead of typing   p.rouge   , it is also possible to type only   .rouge. This will go to create a .rouge rule.

Antoine

Received on Monday, 17 December 2012 08:37:41 UTC