Click here to Skip to main content
15,884,472 members
Articles / Web Development / HTML
Tip/Trick

Text Over Text using CSS

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
25 Nov 2011CPOL 28.4K   3  
Text Over Text using CSS

Description


After seeing this question[^] in Q/A section, I wanted the same thing in CSS, so I have tried & am now posting here.

Code


XML
<html>
<head>
<title>Text Over Text</title>
</head>
<body>
<div style="position:absolute; top:0;left:0;">some text</div>
<div style="position:absolute; top:5;left:5;">some text</div>
<div style="position:absolute; top:10;left:10;">some text</div>
<br/>
<div style="position:absolute; top:110;left:100;">some text</div>
<div style="position:absolute; top:105;left:105;">some text</div>
<div style="position:absolute; top:100;left:110;">some text</div>
</body>
</html>

Browser Compatibility


I have tested this script in the following Web browsers:

  • Internet Explorer
  • Mozilla Firefox
  • Google Chrome
  • Safari
  • Opera

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Team Leader
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
-- There are no messages in this forum --