How to create a class without writing in source view ?
HiddenId <[email protected]> Mon, 17 Dec 2012 08:37:11 +0000 (GMT)
| Newsgroups | gmane.comp.web.amaya.general |
|---|---|
| Message-ID | <[email protected]> |
---1066824098-1093781192-1355733431=:17826 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hello ladies and gentlemen,=0A=0AI'm trying to understand how to create a c= lass 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 docume= nt.=0A=0A=0AThe brilliant Amaya Style Sheet HowTo document ( http://www.w3.= org/Amaya/User/doc/StyleSheets.html ) explains we should first create a sty= le for the element using Style Format, and then, Apply Rule (both using F2 = key to select element).=0AThis works fine. However, I've tried to understan= d how to create an additive class name to the selected element.=0AI explain= :=0A=091. Open a new document, empty, and then write a paragraph with text.= =0A=0A=092. I've a <p> element. I select with F2. I go to Format -> Style E= ditor, and apply a red color style. Then Amaya generate:=0A=09* =A0<p style= =3D"color: red;">=0A=093. Then I select this element again using F2 key. An= d I go to Tools -> Apply Rule. A box appear "use as a class", "select a cla= ss". In the window, I can select the "p" element. However, as I wish to cal= l the class "rouge", how can I do, in order to get a p.rouge rule ?=0AThe a= nswer is very simple: =0A=0A=09* being at stage 3 above, just choose "p" el= ement, and type .rouge just after. Then you will have on the bottom line of= this use a class" window this: p.rouge=0A=09* and then confirm=0AThis will= create an embedded rule "p.rouge", located at top part of source view docu= ment, in style portion of head part.=0A=0AInstead of typing=A0=A0 p.rouge= =A0=A0 , it is also possible to type only=A0=A0 .rouge. This will go to cre= ate a .rouge rule.=0A=0AAntoine=0A ---1066824098-1093781192-1355733431=:17826 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable <html><body><div style=3D"color:#000; background-color:#fff; font-family:ti= mes new roman, new york, times, serif;font-size:12pt"><div>Hello ladies and= gentlemen,</div><div><br></div><div style=3D"color: rgb(0, 0, 0); font-siz= e: 16px; font-family: times new roman,new york,times,serif; background-colo= r: transparent; font-style: normal;">I'm trying to understand how to create= a class using only the formatted view. And I've succeeded to understand ho= wto 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 inspirat= ion involving the understanding for beginners of Amaya Style Sheet Howto do= cument.<br></div><div style=3D"color: rgb(0, 0, 0); font-size: 16px; font-f= amily: times new roman,new york,times,serif; background-color: transparent;= font-style: normal;"><br></div><div style=3D"color: rgb(0, 0, 0); font-siz= e: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">The brilliant Amaya St= yle Sheet HowTo document ( http://www.w3.org/Amaya/User/doc/StyleSheets.htm= l ) explains we should first create a style for the element using Style For= mat, and then, Apply Rule (both using F2 key to select element).</div><div = style=3D"color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman= ,new york,times,serif; background-color: transparent; font-style: normal;">= This works fine. However, I've tried to understand how to create an additiv= e class name to the selected element.</div><div style=3D"color: rgb(0, 0, 0= ); font-size: 16px; font-family: times new roman,new york,times,serif; back= ground-color: transparent; font-style: normal;">I explain:</div><ol><li>Ope= n a new document, empty, and then write a paragraph with text.<br></li><li>= I've a <p> element. I select with F2. I go to Format -> Style Edit= or, and apply a red color style. Then Amaya generate:</li><ul class=3D""><li> <p style=3D"color: red;"></li></ul><li>Then I s= elect 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 selec= t the "p" element. However, as I wish to call the class "rouge", how can I = do, in order to get a p.rouge rule ?</li></ol><div>The answer is very simpl= e: <br></div><ul><li>being at stage 3 above, just choose "p" element, and t= ype .rouge just after. Then you will have on the bottom line of this use a = class" window this: p.rouge</li><li>and then confirm</li></ul><div style=3D= "color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new yor= k,times,serif; background-color: transparent; font-style: normal;">This wil= l create an embedded rule "p.rouge"<span>, located at top part of source vi= ew document, in style portion of head part.</span></div><div style=3D"color= : rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br>= <span></span></div><div style=3D"color: rgb(0, 0, 0); font-size: 16px; font= -family: times new roman,new york,times,serif; background-color: transparen= t; font-style: normal;"><span>Instead of typing p.rouge &n= bsp; , it is also possible to type only .rouge. This will go to= create a .rouge rule.</span></div><div style=3D"color: rgb(0, 0, 0); font-= size: 16px; font-family: times new roman,new york,times,serif; background-c= olor: transparent; font-style: normal;"><br><span></span></div><div style= =3D"color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new = york,times,serif; background-color: transparent; font-style: normal;"><span= >Antoine</span></div></div></body></html> ---1066824098-1093781192-1355733431=:17826--