Why do we use CSS for our blog? To make things look cool of course. One way to spruce up your posts is to make your blog post tile and header text stand out a bit. This will make your blog appear to have the finishing touches and fit your particular style. Afterall, that's what CSS is all about.
Today we're going to be checking out some really great effects we can apply to text anywhere using either a custom class selector or editing our header tags directly on the style sheet to make broad changes to all our posts.
STOP if you don't know what a class is or how to edit tag selectors such as the H2 tag..
REVIEW:
How CSS Can Help Improve Your Blog | CSS For Bloggers: Part 1.
Learn About Class and ID Selectors | CSS For Bloggers: Part 2.
To Span or Not to Span
First we want to decide if we want to change all of our header text or just the text we want.
The text that says "To Span or Not to Span" is my H2 tag. It's the header I use in the middle of my posts. So with the beauty of CSS, anytime I would like to change its style I change the H2 tag selector.
The CSS:
color:#333333;
font-family: 'Droid Sans', arial, serif;
font-size:25px;
letter-spacing: -2px;
font-size-adjust:none;
font-stretch:normal;
font-style:normal;
font-variant:normal;
font-weight:bold;
line-height:1.4em;
margin:1.5em 0 0.75em;
text-transform:uppercase;
}
The HTML:
Alternatively, sometimes I like to get a bit more stylish. I use my custom header with shadow.
And It Looks Like This
The CSS:
{font-family: "Myriad Pro"; "Helvetica Neue", Helvetica;
color: #333333;
font-style: bold;
font-size: 40px;
text-shadow: 0px 3px 0px #cccccc;
}
The HTML:
You can of course change the font to fit your template and adjust the font-size to make it look right.
Now that you see how that works let's get into some cool effects snippets.
Here is a more natural looking shadow, can also be used for glow.
{font-size: 19px;
color: #333333;
text-shadow: 0px 2px 3px #555555; }
{font-size: 19px;
color: #333333;
text-shadow: 1px 1px 6px #555555;
}
{font-family: Arial;
font-size: 35px;
letter-spacing: -3px;
font-weight:bold;
text-transform:uppercase;
}
Font and Text Properties Overview
Knowing the properties and associated values is the name of the game in CSS. Here is a list of the text properties we covered in this post and the values that go with them. You can use these to create all kinds of styles to fit your blog's needs.Can be used to set a number of font values such as size, font, style and weight.
Sets the text font using a specific font or an entire font family.
- font family name
- "Specific Font"
Used to set the size of text in a number of ways. I prefer to use font-size: 16px for example.
- xx-large
- x-large
- larger
- large
- medium
- small
- smaller
- x-small
- xx-small
- length
- % (percent)
Used to set the style of a text element.
- normal
- italic
- oblique
- inherit
Can be used to set a variant of a font.
- normal
- small-caps
- inherit
Mainly used to make the text more or less bold.
- lighter
- normal
- 100
- 200
- 300
- 400
- 500
- 600
- 700
- 800
- 900
- bold
- bolder
Used to set the color of the text in a few different ways.
- color name – example: (blue, yellow…)
- hexadecimal – example: (#ffffff, #000000)
- RGB color code – example: (rgb(255, 0, 0), rgb(0, 0, 0))
Used to add or remove space between the text's letters.
- normal
- length – example: -1px
Much like letter-spacing only with the entire words.
- normal
- length – example: -1px
This is good for making all the letters uppercase, handy for post titles and header text.
- none
- capitalize
- lowercase
- uppercase
Used to create a shadow type effect.
- example: 1px 1px 6px #555555;
Advanced Text Effects
If you've got the simple stuff down and you're looking for some even trickier CSS text styling I've listed a few awesome resources below. Grunge Effect
- How CSS Can Help Improve Your Blog and Tag Selectors
- Learn About Class and ID Selectors
- How to Create Simple Box Content Using CSS
- How to Align Images in Blog Posts Using Float
- Create Attractive CSS Text Effects
- Learn The Anatomy Of A Blogger Template
- How To Identify CSS Elements On Any Template Easily











0 comments:
Post a Comment