Hiding text and changing images with css
I am trying to create a html page with css that works like a preview of an image. An example of this:
http://www.nomorepasting.com/getpaste.php?pasteid=22463
however, this approach has several disadvantages. One of them is that text should always be smaller than images. I tried another try:
http://www.nomorepasting.com/getpaste.php?pasteid=22464
But he couldn't get it to work. Can someone please show me how to change the code on the second link to work the first, or suggest a general best method?
source to share
The error in the second case is not the specified
height attribute
. Try the following, it worked for me.
.class1{
color:#000;
background-image:url('images/2.jpg');height:1000px;
}
The reason you can't see the reverse image is because there is nothing inside the div and the height is not specified
height
0. Try putting some elements in the div and you will see what is displayed image
.
Ramjee
source to share