CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 25th, 2013, 03:54 PM
tradeweb tradeweb is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 4 tradeweb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 28 m 38 sec
Reputation Power: 0
Image over top of text

If I have a <div> container with some paragraphs within that DIV. Is it possible to use CSS to apply an image OVERTOP of the paragraph? Sounds like an odd thing to do...I know! Part of the image will be transparent.

<div class="container">
<p></p>
</div>

Reply With Quote
  #2  
Old February 25th, 2013, 04:24 PM
Nanomech's Avatar
Nanomech Nanomech is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2011
Location: The Pleiades
Posts: 196 Nanomech User rank is Sergeant (500 - 2000 Reputation Level)Nanomech User rank is Sergeant (500 - 2000 Reputation Level)Nanomech User rank is Sergeant (500 - 2000 Reputation Level)Nanomech User rank is Sergeant (500 - 2000 Reputation Level)Nanomech User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Day 23 h 52 m 41 sec
Reputation Power: 7
Send a message via Skype to Nanomech
Hi tradeweb,

Give this a go:
Code:
<div id="container">
<p>This is some text This is some text This is some text This is</p>
</div>

<img src="phpwp.jpg" alt="php wallpaper" />

CSS:
Code:
#container
{
	width: 100px;
	height: 100px;
	border 1px solid black;
	background: red;
}

img
{
	width: 100px;
	height: 100px;
	position: relative;
	top: -30px;
	left: 70px;
}


I'm not sure on how to make only the part which is covering your paragraph have a low opacity. I can make the whole image transparent but not part of it unless there is some code I've not come across before. It can be done but I'm thinking maybe Javascript to calculate it somehow?

Anyone got more thoughts on this, I'm curious now!

Regards,

NM.
__________________
"WERE NOT WORTHY!"
"WERE NOT WORTHY!"

Last edited by Nanomech : February 25th, 2013 at 04:47 PM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > Image over top of text

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap