Solved

position text precisely on top of an image

Posted on 2011-03-01
3
205 Views
Last Modified: 2012-06-27
How do I position some text precisely on top of an image? I don't want to use absolute positioning relative to the browser window, but positioning relative only to the image. So if the image moves, the text maintains its position within the image.
0
Comment
Question by:SweatCoder
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 40

Accepted Solution

by:
gurvinder372 earned 500 total points
ID: 35013797
try set the positioning of a block (div) as absolute, with the image as its background image and the text as its content
0
 
LVL 11

Author Comment

by:SweatCoder
ID: 35018292
How do I set a background image on a div? I want the div to be exactly the same size as the image so that the image entirely covers it.
0
 
LVL 40

Expert Comment

by:gurvinder372
ID: 35024296
<< How do I set a background image on a div? >>
you can set the background image of almost any element. please check
http://www.w3schools.com/css/css_background.asp

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer…
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
In this Micro Tutorial users will learn how to embed custom fonts into websites using @font-face in CSS Select a font: Ensure the EULA allows you to use @font-face: Download the font: Get the browser-compatible files you need: Edit your CSS       - Name …
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
Suggested Courses

632 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question