Integrated Search Marketing, Pay-per-Click, and business strategy.
   utilizing technologies usability web marketing portfolio/ resume faqs
html goodies
css goodies
javascript bag o' tricks
website evaluation
white space
newsletter writing
search engine optimization (SEO)
meta tags
branding YOU
Resume: Search Marketing
web portfolio
Article: WebSite Equals ROI
geodemographics
xml
using server side includes
designing store locators
anti-spam laws
 
  overview
  creating sub-classes
  css examples

css sub-classes

Writing and doing a CSS subclass is pretty straight-forward. For those of you who don't know what a sub-class is let me explain.

In programming a class is an object that contains properties, attributes, and values. For example, the object of a house contains a kitchen, a bathroom, a bedroom or two, and maybe a basement or attic. A sub-class could be a den in which the den is a cross between a livingroom and an office.

With CSS you can create unlimited numbers of sub-classes. For instance let's say I have a news bulletin box and I want to text inside that to be bolded in a light red color. I can create a CSS sub-class for the paragraph HTML tag shown below to do just that.

(<p>some text</p>)

Here's the CSS sub-class:
p.newsbulletin { font-family: Arial, Helvetica, Sans-Serif ;
  font-weight: bold;
  color: red;}

  1. Note the period. The period is used in CSS to denote a sub-class.
  2. Also note the curly braces. These contain the "attributes" of the sub-class. Just like your house has various rooms, those rooms contain certain characteristics. Eg: blue painted walls.
        Every CSS element must have an opening bracket and a closing bracket.
  3. Lastly, note the semi-colon that is placed after each paragraph attribute. The semi-colon tells the CSS interpreter to literally end the attribute.

Here's the sub-class in action:

Newsletter Bulletin: CSS sub-classes finally added to website!

 
© 2000-2007 StephanieCota.com  |  site map