Mandarin Logo
MainBlogFAQsBox TipsText TricksColor ChartFree GalleryCSS Opacity
TWO CENTS CURRENT ISSUE 2006 WEST SACRAMENTO CALIFORNIA

Referencing Multiple CSS Classes

class="box left blue"
class="box right orange"
class="box center white"

"Hi. I just tripped on your site ...I was playing with some news boxes here and was wondering if I wanted to see what might be the best way to create a class - say pastel_boxes and then just be able to pick 'blue, green' whatever. In other words I can write a class for blue, one for gray, one for green, one for green with double border etc but most of the code is the same so it seems a waste...
Burt"

We can define the box and then define each background color in a separate class. When we write the HTML we can refer to the class for the background color we want. The color classes are reusable.

CSS

Copy and paste this in your style sheet.

HTML

Copy and paste this in your Blog or Web page.

It will look like this.

Text
Text
Text

Positioning

We defined classes for left, right, and center. Now we can combine the classes to color and position the box.

Copy and paste this in your Blog or Web page.

It will look like this.

Text
Text
Text

W3C

All elements inside the 'BODY' element can be classed, and the class can be addressed in the style sheet:

The normal inheritance rules apply to classed elements; they inherit values from their parent in the document structure.

One can address all elements of the same class by omitting the tag name in the selector:


.pastoral { color: green } /* all elements with CLASS pastoral */

W3C

Overheard

Overheard: RoadApples is floating left and right with a nice black and white family photo. Claude posts the old black and whites but today she is Jackie. Shirl does this Monday Madness thing and for this first time ever there was an answer that is surprising. Is Stu colorblind or does the orange box look red? Hey, he's talking about me. He admits that Opera fans are losers but only because he probably figured out that I'm hooked on the latest release of Opera working so fine with Opacity (CSS3 Specs!).

Does anyone know how we can do the topics like Gary Turner's right sidebar topics without faking it? Does it require PHP?

Hardware beats Software at Alexaholic.com.

Saturday, March 18, 2006     Permalink   EMAIL  

E=mc²

E=mc² Stu will be celebrating Einstein's birthday today. I think we are supposed to visit him and read. He probably won't be serving any Pi, even though today (March 14 or 3-14) is Pi Day, the day we celebrate our favorite number 3.14159

Copy and paste this in your blog or web page.

It will look like this.

E=mc² Stu will be celebrating Einstien's birthday with the rest of the world. And more text goes here. And more text goes here. And knowing Stu, the text will be interesting with a whiz bang punch. Or, something like that. I'm just typing for demonstration. Is this what you wanted Stu? We need to type in enough text to demo what it might look like on your page.

Tuesday, March 14, 2006     Permalink   EMAIL  


Pantone Fashion Color Report Spring 2006


Pantone Illustration

Pantone presents us with the fashion color report for spring. The colors alone don't look so exciting but the way the report combines the colors looks great and looks like the colors we are using to update our spring wardrobes. Does this have an impact on Web Color trends? Oh yes. Fashion colors go from our clothes to our walls and are incorporated into our Web designs. As standalone colors they don't do much, but pair them or mix them up and even these colors can strut their stuff.

Spring Fashion Colors in hexadecimal
Color FCF4BD Pantone French Vanilla
Color EDE5DA Pantone Sand Dollar
Color A6DDE8 Pantone Blue Tint
Color EEC1D5 Pantone Cameo Pink
Color D1E0B2 Pantone Lily Green
Color B2D0E8 Pantone Skyway
Color A9A9D5 Pantone Viola
Color F89F6D Pantone Melon
Color 89614C Pantone Clove
Color 005695 Pantone Deep Ultramarine

Pantone Fashion Colors
The colors here may not match PANTONE-identified standards. We sampled the colors in Adobe to get the Web equivalent color.

Monday, March 13, 2006     Permalink   EMAIL  

Secrets of Style

Everything in CSS is a Box

Daisy likes the way the drop cap makes its own little box, which is a good reminder that everything in CSS is a box. And because it is a box we can take our crayons out and color the background and outline the box. The letter "D" for Daisy is in a box, the paragraph is a box, and every piece of text here is in a box.

The code for the dropcap is simple, but we can fancy it up a bit. We use the inline CSS for fiddling with the look. We put our drop cap in a span

We made a few adjustments to the drop cap.

  1. background:khaki; We added a background.
  2. border:1px solid darkkhaki; We added a border around the drop cap.
  3. margin-right:5px; We added a margin to the right of the boxed drop cap.
  4. margin-top:5px; We explicitly set the top margin.

Khaki Drop Cap: 80 Pixels

This is a drop cap with a khaki background, white text, and a darkkhaki border. We used named colors so that we can make changes to the code easy. It might look better with a colored border. And we would likely want to change the color of the drop cap. We used the named color white.

Copy and Paste this in your Blog or Web page.

It will look like this.

This is a drop cap with a khaki background, white text, and a darkkhaki border.

Firebrick Drop Cap: 80 Pixels

Mike Golby might like the background color firebrick better than gold. Golby changes text colors for emphasis but if we don't specify the color for the text it will default to normal text color for that page. By the way, thanks for the Strunk and White Plumerias Mike. I noticed them when visiting your place to find an example of a color to use.


Copy and Paste this in your Blog or Web page.

It will look like this.

Mike Golby might like the background color firebrick better than gold.

Drop Cap Letters

Claude noticed that some letters look better than others. Magazines sometimes change the wording of a sentence for the sole purpose of using a nice "T" or "M" for the first big letter. Notice the differences in the letters.

B

U

S

H

W

H

A

C

K

E

R

More named colors are in the Web Color Names Chart

Update: RoadApples has a good rendition of the colored drop caps customized to fit his blog. And Shirl's version will knock your socks off. It really does look like an alphabet block.

Saturday, March 11, 2006     Permalink   EMAIL  

Secrets of Style

The code for the dropcap is simple. We always put it in a paragraph and show the entire inline drop cap style so it looks like it takes more code than the drop cap itself requires. We use the inline span style since we don't use it often enough to justify adding weight to our style sheet. But, if we start using it on a regular basis we would add the code to our CSS (Cascading Style Sheet) so that we don't have to type it in again each time we use the dropcap style. The copy and paste CSS is here. Let's try a few more sizes before we define the dropcap style sheet code.

Drop Cap: 80 Pixels

This is a sentence.

Copy and Paste this in your Blog or Web page.

It will look like this.

This is a sentence.

Drop Cap: 60 Pixels

This is a sentence.

Copy and Paste this in your Blog or Web page.

It will look like this.

This is a sentence.

Sunday, March 05, 2006     Permalink   EMAIL  

Archives

2006: J F M A M J J A S O N D

2005: J F M A M J J A S O N D

2004: J F M A M J J A S O N D

Mandarin Design
"For people who make mistakes"

HTML and CSS Examples
Popular Blog Code
TIPS and TRICKS

Magazine style is easy with simple copy and paste code for styled drop caps, small pullquotes, new orange pull quotes,
...this will look like some of the pullquotes and styles we see in magazinelayout...
opacity pullquotes, and easy pull quotes. A magazine cover and highlights are served cut and paste style in Text Tricks. Add Polaroid borders, triple borders, and float pictures left and right the easy way with tips and tricks in the Box Tips and FAQ sections.



Search WWW Mandarin

THEBLOGS!

April Quilt The Quilt People...October 2004 The Quilt People...April 2004 Deaf Blogger Sign In The Quilt People...November 2003 including the Women and Tech Blog Prom The Quilt People...October 2003  Women and Tech Blog Prom
NEW SITES COMING IN


000000330000660000990000CC0000FF0000
003300333300663300993300CC3300FF3300
006600336600666600996600CC6600FF6600
009900339900669900999900CC9900FF9900
00CC0033CC0066CC0099CC00CCCC00FFCC00
00FF0033FF0066FF0099FF00CCFF00FFFF00
00FF3333FF3366FF3399FF33CCFF33FFFF33
00FF6633FF6666FF6699FF66CCFF66FFFF66
00FF9933FF9966FF9999FF99CCFF99FFFF99
00FFCC33FFCC66FFCC99FFCCCCFFCCFFFFCC
00FFFF33FFFF66FFFF99FFFFCCFFFFFFFFFF
00000000330000660000990000CC0000FF00
00003300333300663300993300CC3300FF33
00006600336600666600996600CC6600FF66
00009900339900669900999900CC9900FF99
0000CC0033CC0066CC0099CC00CCCC00FFCC
0000FF0033FF0066FF0099FF00CCFF00FFFF
3300FF3333FF3366FF3399FF33CCFF33FFFF
6600FF6633FF6666FF6699FF66CCFF66FFFF
9900FF9933FF9966FF9999FF99CCFF99FFFF
CC00FFCC33FFCC66FFCC99FFCCCCFFCCFFFF
FF00FFFF33FFFF66FFFF99FFFFCCFFFFFFFF
0000000000330000660000990000CC0000FF
3333003333333333663333993333CC3333FF
3366003366333366663366993366CC3366FF
3399003399333399663399993399CC3399FF
33CC0033CC3333CC6633CC9933CCCC33CCFF
33FF0033FF3333FF6633FF9933FFCC33FFFF
3300003300333300663300993300CC3300FF
6600006600336600666600996600CC6600FF
9900009900339900669900999900CC9900FF
CC0000CC0033CC0066CC0099CC00CCCC00FF
FF0000FF0033FF0066FF0099FF00CCFF00FF
3333003333333333663333993333CC3333FF
6666006666336666666666996666CC6666FF
9999009999339999669999999999CC9999FF
CCCC00CCCC33CCCC66CCCC99CCCCCCCCCCFF
FF0000FFFF33FFFF66FFFF99FFFFCCFFFFFF
000000333333666666999999CCCCCCFFFFFF

Blog Tips, Tricks, and Cheats

Magazine Style: The Joy of CSS
The joy of CSS. Here we are using font sizes, margins, floats, and line height to position the text exactly where we want it. Copy and paste code is here.

Image of code in IE and Mozilla
MAKE A LOGO
MAKE A BANNER OR LOGO NOW
Make Your Own Banner
Make Your Own Logo
LINK TO MANDARIN
ADJUSTABLE TEXT LINK

You don't need images to link to us.

Blog Trashed by Mandarin

Copy and paste this in your page.

It will look like this.

Blog Trashed by Mandarin

You are welcome to take this text link. Fiddle with it and make it your own. Or, you can post it exactly as it is.

Recent Tips and Tricks


January 2006
CSS Float - float image and caption to the left.


February 2006
Copy and paste call outs and CSS opacity borders.


March 2006
CSS Classes
Referencing multiple CSS classes to make a box float.


April 2006
Magazine style CSS and Alphabet blocks for added unique Blog style.


CSS Classes
Referencing multiple CSS classes to make a box.


Polairoid Border
The Polaroid border is served copy and paste style.


Fashion Colors
The latest Web fashion colors.


Magazine Style
Magazine style cover image with a rainbow insert.

MANDARIN MAIN PAGE


More Free Tips and Tricks on the Mandarin Main Page Click Here


THE END

Michelle and Rob Wooliscroft

own and operate this site. Phone 916-371-6977 for more information.
MAIN BLOG FAQs CSS:Boxes TRICKS About CSS Style Color Chart GALLERY PureText
Validate HTML Validate Style Sheet Elements of Style Yahoo Buzz Google Zeitgeist Lycos 50 W TP TP2 TF Technorati Sitemeter
Mandarin Archives 2006: J F M A 2005: J F M A M J J A S O N D   2004: J F M A M J J A S O N D  
Clean PC Banners Free Banners Tag Board Gator ColdFusion Fade Images Refer Grouping Web Help Drop Caps
This work is licensed under a Creative Commons License