S
spolsky
hi,
it is possible to apply multiple styles as shown in the following
example.
<STYLE TYPE="text/css"><!--
BODY { background-color:salmon; }
P { margin-left:20px; }
.clsCode { font-family:"Comic Sans MS"; font-size:10pt; color:navy;}
#idP1 { text-align:left; font-weight:bold; }
--></STYLE>
<P ID="idP1" CLASS="clsCode">Multiple styles</P>
however, i would like to apply multiple styles in this manner with
scripting. i want to assign a style class and apply another along with
the previous one. how can i achieve this? what is the best approach for
IE 6? are there any w3c standards that makes applying multiple styles
possible?
is it possible to assign multiple selectors to class attribute?
<P CLASS="clsCode1, clsCode2">Multiple styles</P>
is it possible to nest selectors within them?
.clsCode1 { font-family:"Comic Sans MS"; font-size:10pt; }
.clsCode2 { clsCode1; color:navy;}
thanks.
it is possible to apply multiple styles as shown in the following
example.
<STYLE TYPE="text/css"><!--
BODY { background-color:salmon; }
P { margin-left:20px; }
.clsCode { font-family:"Comic Sans MS"; font-size:10pt; color:navy;}
#idP1 { text-align:left; font-weight:bold; }
--></STYLE>
<P ID="idP1" CLASS="clsCode">Multiple styles</P>
however, i would like to apply multiple styles in this manner with
scripting. i want to assign a style class and apply another along with
the previous one. how can i achieve this? what is the best approach for
IE 6? are there any w3c standards that makes applying multiple styles
possible?
is it possible to assign multiple selectors to class attribute?
<P CLASS="clsCode1, clsCode2">Multiple styles</P>
is it possible to nest selectors within them?
.clsCode1 { font-family:"Comic Sans MS"; font-size:10pt; }
.clsCode2 { clsCode1; color:navy;}
thanks.