Mukhbir

 
  • Increase font size
  • Default font size
  • Decrease font size
  • default color
  • green color
  • blue color

Add Text before or after An element using css

E-mail Print PDF

This tutorial will show how to add text before or after any element using css with an example.

1. Add this to the css part:

h1#example::before, h1#example::after {
content: “--::--::--”;
}

2. Enter the following changes to the body of the document:

<h1 id=’example’>Albert Einstein</h1>

Comments (2)Add Comment
0
pedro
October 14, 2009
190.137.152.42
Votes: +0
...

Hi, this worked great smilies/wink.gif

thkz

0
Nabeel
April 11, 2010
203.99.185.135
Votes: +0
...

i am glad that it helped you smilies/smiley.gif (btw i knew it works thats why shared it here smilies/wink.gif)

Write comment
 
  smaller | bigger
 

busy
Last Updated ( Monday, 29 December 2008 11:22 )