![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
is there a way to "combined" the 3 styles into a 4th one eg: <style .mywarning {box; warning; bordered} </style |
#3
| |||
| |||
|
|
.bordered {border: red thin soldid;} .warning {background-color: #900;} .box {padding: 5%; text-align:justify;} is there a way to "combined" the 3 styles into a 4th one |
#4
| |||
| |||
|
|
.mywarning, .bordered {border: red thin soldid;} |
#5
| |||
| |||
|
|
*Harag* <harag (AT) softGETRIDOFCAPLETTERShome (DOT) net>: .bordered {border: red thin soldid;} .warning {background-color: #900;} .box {padding: 5%; text-align:justify;} is there a way to "combined" the 3 styles into a 4th one .mywarning, .bordered {border: red thin soldid;} .mywarning, .warning {background-color: #900;} .mywarning, .box {padding: 5%; text-align:justify;} Virtually every CSS tutorial would have told you that in its "Selectors" chapter. |
#6
| |||
| |||
|
|
I'm dont think you quite understand what I was after. I don't want to redefine "bordered, warning & Box" I just want to use them in one class. if I have in one css fiile "FX.css" .Bordered {border: red thin solid;} .bgCCC {background-color: #CCC;} .bg00C {background-color: #00C;} .bg0C0 {background-color: #0C0;} .bgC00 {background-color: #C00;} .Box {padding: 5%; text-align:justify;} I want to beable to define things like .Warning {Bordered; bgC00; Box ![]() .Note {bg00C; Box} |
|
then in my html i can do: div class="Warning">this is a warning</div instead of: div class="Box Bordered bgC00">this is a warning</div if I want to change the background color of warnings throughout the page then I can just edit the ".Warning {Bordered, bgC00, Box)" and change it to ".Warning {Bordered, bgCCC, Box)" rather than edit every DIV on the page where the warning is used. |
#7
| |||
| |||
|
|
I'm dont think you quite understand what I was after. |
|
I don't want to redefine "bordered, warning & Box" I just want to use them in one class. |
![]() |
| Thread Tools | |
| Display Modes | |
| |