5
Basically, all you're doing in the above code is defining a CSS class. For example, for every div that has a class (.) of xoopsQuote, the following CSS will be applied...
background: #FAFAFA;
border: 1px solid #6C87B0;
color: #385a72;
width: 400px;
max-height: 250px;
margin: 0.5em;
overflow: auto;
padding: 5px;
font: 11px FixedSys, "Courier New", Courier, monospace;
Now, you can apply such CSS tricks to any class you want. For example, say you want to reuse this CSS for a custom class on your homepage. Start out by naming your class. For our example, we'll call it customclass1
.customclass1 {}
Everything you place in the curly brackets {} will be CSS definitions for the class .customclass1
Now paste the CSS definitions inside the curly brackets, like so... (Note: this should be placed in your style.css file)
.customclass1 {
background: #FAFAFA;
border: 1px solid #6C87B0;
color: #385a72;
width: 400px;
max-height: 250px;
margin: 0.5em;
overflow: auto;
padding: 5px;
font: 11px FixedSys, "Courier New", Courier, monospace;
}
Now simply apply the above class to the HTML element you wish to have the desired effect. Since we did not specify div, or p, or td in the class definition, we can apply it to whatever HTML element we wish. For example...
<p class="customclass1">Hello World!p>
~OR~
<div class="customclass1">Hello World!div>
Hope that helps.
JM
Insanity can be defined as "doing the same thing over and over and expecting different results."
Stupidity is not a crime. Therefore, you are free to go.