Next Question

Mahalo is adding a tip to all questions that don't offer a tip.
M¢50 Funded By Mahalo ? |
September 06, 2009 06:20 PM
RSS
Yes. You can use javascript in the head section of your page. For example if you had a paragraph tag that looked like:
p this is the text im trying to cover up /p
You could give the section an id so that the new code would look like:
div id="coverup"
p this is the text im trying to cover up /p
/div
Then go to the head section of your page and put the line of code:
script type="text/css"
#coverup{position:absolute;
top:100px;
left:100px;
}
/script
By changing the px vaules to position where you want the image to cover up the paragraph, or changing the pixel values to percentages.
Permalink | Report
Answered Question

Mahalo is adding a tip to all questions that don't offer a tip.
Is it possible to replace a paragraph with an image using JavaScript?
I have been trying to replace letters in paragraphs using JavaScript, but I haven't had any success yet. Is there a simple way to do this?
Interesting Question?
Yes (0)
No (0)
- In Web Development |
- Tags: javascript |
- |
- Report |
-
Share
RSS
Best Answer Chosen by Asker
| September 06, 2009 09:38 PM |
p this is the text im trying to cover up /p
You could give the section an id so that the new code would look like:
div id="coverup"
p this is the text im trying to cover up /p
/div
Then go to the head section of your page and put the line of code:
script type="text/css"
#coverup{position:absolute;
top:100px;
left:100px;
}
/script
By changing the px vaules to position where you want the image to cover up the paragraph, or changing the pixel values to percentages.
| Asker's Rating: |
• Thanks. I figured out how to replace text images by accessing the innerHTML of the attribute, and it worked!
Permalink | Report
Answer this Question
Related Questions
Ask a Question
Buy Mahalo Dollars with Credit Card or PayPal
Top Members
Most Popular Tags
Categories
- Anonymous
- Arts & Design
- Beauty & Style
- Books & Authors
- Business
- Cars & Transportation
- Consumer Electronics
- Coupons Deals
- Education
- Entertainment
- Environment
- Fitness
- Food & Drink
- From Email
- From Iphone
- From Twitter
- Health
- History
- Hobbies
- Home & Garden
- How Tos
- Humor
- Jobs
- Legal
- Local
- Love & Relationships
- Mahalo Answers Community
- Money
- Music
- News
- NSFW
- Parenting
- Pets
- Science & Mathematics
- Services
- Shopping
- Social Science
- Society & Culture
- Sports
- Technology & Internet
- Travel
- Video Games
Welcome New Members
- jawad1, December 17, 2009 05:42 AM
- arjaypogi, December 17, 2009 05:26 AM
- ahuq, December 17, 2009 05:25 AM
- johnarjayaustri..., December 17, 2009 05:23 AM
- fb_1457641589, December 17, 2009 05:15 AM
Mahalo Dollars are the currency of Mahalo Answers.
Each Mahalo Dollar costs $1.
Once you earn more than 40 Mahalo Dollars, you can request to be paid via PayPal. Each Mahalo Dollar is currently worth $0.75 when paid out via PayPal. Learn More