As you may know if you’ve been reading here for a bit, I provide lots of pre-made Posting Classes & Elements for you so you can style and format your content in many ways without making you delve into the CSS, or even use the USERS_CSS file I made for you. That said, though, it doesn’t mean you’ll not want or need additional styles. If it’s something you’ll use over and over again by all means put it in the USERS_CSS file, but if not, in-line styles may prove to be the perfect solution.
By in-line styles I do not mean using junk like
font tags and what not. Nor do I mean adding
border="0" to anything. Those aren’t in-line styles. These are attributes and only certain attribute can legally be used. One that can be used is the
The “style” attribute can be used for adding proper CSS style properties to any element or object and it will override any conflicting styles (the style that is closest to that being styled will win out. Case in point: You may or may not know at this point in your reading about this theme that you can take a styled elements and by adding another class to it you can change the look for that single occurrence. This class addition overrides the default styling for that existing class or element.
I’ll use the strong element to show you what I mean. It is written like this,
<strong>Strong emphasis text goes here!</strong>, and with this theme it’ll look like this: Strong emphasis text goes here! Now if we add the highlight class, for example, we can make it the highlight color (#669900 or a shade of green in this case). It would be written like this,
<strong class="highlight">Strong emphasis text goes here!</strong>, and the resulting output would look like this: Strong emphasis text goes here!.
Well, there is another way. Let’s say you want that text to be a shade of blue. I’ll use #009999 in this example. Well, unless you want to change the entire highlight class to this shade of blue in the USERS_MODS file, you will have to either create a “blue” class, or if this is going to be a single usage, just put an in-line style attribute in the element and set its properties exactly as you would for any CSS entry. Like this:
<strong style="color:#009999;">Strong emphasis text goes here!</strong>. The output will be like this: Strong emphasis text goes here!.
You can do this with just about anything. Need more CSS information? This favorite resource of mine, Web Design Group CSS Properties, may help a lot.
Now you can have even more fun. Do, however, validate your CSS after adding in-line styles to ensure your site is still legal. Don’t know how to validate? This entry on “Page Validation” will help.