Internet Handholding posted on August 03, 2010 11:15
Here is some CSS to make highlighting information on your website easy.
Rather than putting the highlighting directly in your HTML code, you create a CSS class and use the CSS class on the part you want to highlight.
By using different CSS classes, you can have a consistent means of highlighting information throughout your website, which you can easily change.
This highlighted text above is accomlished with this html.
<span class="info">highlighting information</span>
The highlighted boxes on this page, are accomplished with this html.
<div class="infobox">text</div>
Here is the CSS for the inline text and the simple box above.
/*----------------------------------------*/
.info
{
background-color:#DDDDDD;
}
/*----------------------------------------*/
.infobox
{
background-color:#DDDDDD;
border:solid 1pt black;
padding:.5em;
}
/*----------------------------------------*/
For a compatible table with similar formatting, see this article CSS Tables without HTML CellPadding and CellSpacing to Remove Space Between Cell Borders
By Andrew Weitzen, Bronze Inc. (c) 2010
Bronze is the publisher of several online Internet journals including: InternetHandholding.com, DomainNames.gs, DotNetNuke.bz, Programmer.bz, Software.vg, WebHosting.vg