Take the 2-minute tour ×
.classname {
font-family:Tahoma, Geneva, sans-serif;

<div class="classname">Text</div> 

Why the Text is above of image? What should I add to make it normal? I can use padding-top, but then the bottom of image will have space too if you know what I mean. Thanks.

share|improve this question

2 Answers 2

up vote 0 down vote accepted

I created this for you, I think that's how you want to make it.

share|improve this answer

Because the image is a background for the text.

If you're trying to make an image button with text fallback, do <img src="someurl" alt="sometext" />

What do you mean by above?

share|improve this answer
you should try it yourself and you'll see –  good_evening Jun 24 '10 at 17:44
Well based just on the code there, 'above' would mean 'on top of in the z plane', I can read the CSS. Which would imply to me that you want the text to only appear if the image doesn't. In which case my answer should solve your problem. –  cthom06 Jun 24 '10 at 18:02

Your Answer


