constancy wrote:How do you put text on a picture using CSS? Like, lets just say you put a picture on your webpage. And now you want to put text on it using CSS. How do you do that? Or is it even possible. Unless, you have to edit your picture and put text on it using a graphic program. I'm just wondering if it is possible to put the text on the picture using CSS.
I know that you are trolling but please next time, try google instead:
http://www.w3schools.com/Css/tryit.asp? ... css_zindex
Here's another example:
<html><head>
<style type='text/css'>
body{background:black;}
span{color:black;font-weight:bold;font-size:16pt;}
/* position absolute with different z-index */
#logo{position:absolute;top:10px;left:20px;z-index:0;}
.txt{position:absolute;top:45px;left:50px;z-index:2;}
/* with or without background color */
#t1{background-color:yellow;top:30px;}
#t2{background-color:transparent;top:55px;}
</style>
<body>
<img id='logo' src='http://www.google.com/intl/en_us/images/logo.gif' />
<span id='t1' class='txt'>Lorem ipsum is great!</span>
<span id='t2' class='txt'>Lorem ipsum is awesome!</span>
</body>
</html>