I’m new to CSS and wondering if you can give me a little help. I have been working through some tutorials and was having a little play with some popup images.
I can’t for the life of me work out where the 4px gap is coming from between the thumbnails.
I wanted to space my little gallery with a 12px margin between the coloured squares, but it moves about quite strangely when i add in my own margin. Am I just doing it in the wrong way?
I have all my code here http://jsfiddle.net/p45JH/5/
Here is the CSS code im using:-
.thumbnail {
position: relative;
z-index: 0;
}
.thumbnail:hover {
background-color: transparent;
z-index: 50;
}
.thumbnail span {
position: absolute;
background-color: white;
font-family:Arial, Helvetica, sans-serif;
text-align:center;
padding: 5px;
left: -1000px;
border: 1px solid #CCC;
visibility: hidden;
color: black;
text-decoration: none;
}
.thumbnail span img {
border-width: 0;
padding: 2px;
vertical-align:bottom;
}
.thumbnail:hover span {
visibility: visible;
bottom: 35px;
left: 35px;
}
I’m sure it’s really simple, just my limited knowledge stopping me from figuring it out.
Thanks for any help you can offer.