Mandarin Logo
MainBlogFAQsBox TipsText TricksColor ChartFree GalleryCSS Opacity
TWO CENTS CURRENT ISSUE 2006 WEST SACRAMENTO CALIFORNIA
CSS StyleFun with CSS
"For People Who Make Mistakes"...

What Color is Your Background?

20 + ways to
Blog

The joy of CSS. Here we are using font sizes, margins, floats, and line height to position the text exactly where we want it. The browsers don't handle the code exactly the same but one style will suit some while the other style will suit others.

In this playful HTML CSS journey we are explicitly telling the browser the width and height for better control.

For the number 20 we are telling the browser where we want the top margin and the line-height for this font size.

width:375px;height:475px;

The defined width is 375 pixels wide. We are suggesting to the browser that we would like to limit the width to 375 pixels wide. We had to fiddle with it to get the width just right. IE automatically stretches wide enough to display the content but the best practice might be to specify the width.

We have to tell Mozilla Firefox the height so we put in height:475px;. Mozilla wants explicit directions. In IE the height doesn't have to be defined. It will stretch to fit.

background:transparent;

We used background:black;. If we change that to background:transparent; then our natural background color will show through.

Using the Color Name

We can change the background to any color name that the browser recognizes. We use named colors that browsers recognize including white, pink, yellow, lemonchiffon, yellowgreen, ivory, hotpink, and lightseagreen. It's easier to adjust the color name than the hex or RGB color.

Copy and paste this in your Blog or Web page.

It will look like this.

20 + ways to
Blog

The joy of CSS. Here we are using font sizes, margins, floats, and line height to position the text exactly where we want it. The browsers don't handle the code exactly the same but one style will suit some while the other style will suit others.

What Color is Your Background
#  Last Updated:  Monday, April 25, 2005
You are viewing one post
VIEW ALL    BACK TO TOP

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 TP TP2 TF Technorati Sitemeter
Mandarin Archives 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   2003: 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