Home arrow Style Sheets arrow Page 3 - CSS: Top Secret Classification
STYLE SHEETS

CSS: Top Secret Classification


This article will self-destruct in twenty seconds. Okay, not really; it will probably take you longer than that to read it, and you may even want to use it as a reference. In this mind-blowing episode, we discuss the many classification properties in CSS, all of which give you the ability to determine how and where your elements are displayed.

Author Info:
By: James Payne
Rating: 5 stars5 stars5 stars5 stars5 stars / 4
April 14, 2008
TABLE OF CONTENTS:
  1. · CSS: Top Secret Classification
  2. · Floating Elements
  3. · Floating Text for a Fairy Tale Look
  4. · Creating a Menu

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
CSS: Top Secret Classification - Floating Text for a Fairy Tale Look
(Page 3 of 4 )

Sometimes in books, especially those difficult-to-read ones written for children, you will see a paragraph that starts off with an enormous first letter. You can create these obese beginnings in HTML by making floating text, like so:


<html>

<head>

<style type="text/css">

span

{

float:left;

width:0.8em;

font-size:500%;

font-family:times;

line-height:80%;

}

</style>

</head>

<body>

<p>

<span>O</span>nce upon a time in a land far, fary away there lived a bad-assed martial artist named Bruce Lee. He ruled all of the land with an iron fist and was known to round kick ugly babies on sight. One year a guy with a dumb beard and too much plastic surgery named Chuck Norris came to visit him. Seeing how hideous the red-haired fiend was, Bruce Lee crane kicked him so hard he turned into Mr. T and went on to enjoy a modicum of fame.</p>

<p>The End</p>

</body>

</html>

We could of course also float some text to the right:


<html>

<head>

<style type="text/css">

span

{

float:right;

width:0.8em;

font-size:200%;

font-family:times;

line-height:80%;

border: 1px solid black

}

</style>

</head>

<body>

<p>

<span>Bruce: <i>A Life Story</i></span>Once upon a time in a land far, fary away there lived a bad-assed martial artist named Bruce Lee. He ruled all of the land with an iron fist and was known to round kick ugly babies on sight. One year a guy with a dumb beard and too much plastic surgery named Chuck Norris came to visit him. Seeing how hideous the red-haired fiend was, Bruce Lee crane kicked him so hard he turned into Mr. T and went on to enjoy a modicum of fame.</p>

<p>The End</p>

</body>

</html>


blog comments powered by Disqus
STYLE SHEETS ARTICLES

- CSS Combinators: Working with Child Combinat...
- CSS Combinators: Using General Siblings
- Intro to CSS Combinators
- CSS Semicircles and Web Page Headers
- Drawing Circular Shapes with CSS3 and Border...
- More CSS Pagination Link Templates
- CSS Pagination Links
- Animated CSS3 Image Gallery: Advanced Transi...
- CSS3 Animated Image Gallery: Transitions
- CSS3 Properties: Fixed Heights with box-sizi...
- CSS3 Properties: Altering Strokes and 3D Eff...
- CSS3 Properties: Text-Stroke
- CSS3 Transitions: Width and Height Properties
- Creating a Drop Down Menu in CSS3
- Intro to CSS Transitions

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 11 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials