Text on top of an image

I have this image

<img src="images/slideshow/slide-2.png"  width="948" height="341" alt="Slide 2" />

Open in new window


I want to it in a div with a text on top of it. Is this doable? I tried this but didnt show up

<div style="padding:100px 250px 15px 250px; background: url (images/slideshow/slide-2.png) "> 
                <h2>Creating a community, one referral at a time</h2> 
                <img src="images/hipaa-logo.jpg"  alt="Slide 2" />
                </div>

Open in new window

LVL 8
CamilliaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

activematxCommented:
Here is HTML.

<div id="container">
    <img id="image" src="images/slideshow/slide-2.png"/>
    <p id="text">
        Creating a community, one referral at a time
    </p>
</div>

Open in new window


Here is CSS

#container
{
    height:400px;
    width:400px;
    position:relative;
}

#image
{    
    position:absolute;
    left:0;
    top:0;
}
#text
{
    z-index:100;
    position:absolute;    
    color:white;
    font-size:24px;
    font-weight:bold;
    left:150px;
    top:350px;
}

Open in new window


Here is an example:  http://jsfiddle.net/EgLKV/3/
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CamilliaAuthor Commented:
I see the image but not the text. I wonder if I need to play around with the CSS. I do see it in Chrome's "console" . It renders like this

<div id="container" style="position: absolute; top: 0px; left: -400px; display: none; z-index: 3; opacity: 1; width: 400px; height: 400px;">
                    <img id="image" src="images/slideshow/slide-2.png" alt="">
                 <p id="text">
                 Creating a community, one referral at a time
               </p>
              </div>

Open in new window

0
CamilliaAuthor Commented:
Found out what it is. It's one of the CSS tags. The 'text" one. I'll play around with it.
Thanks
0
activematxCommented:
Try changing the text color to black.  Is your image white?
0
CamilliaAuthor Commented:
yes, that was one of the issues. It's working now. Thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.