943,879 Members | Top Members by Rank

Ad:
Dec 2nd, 2008
0

negative margins

Expand Post »
Hi

I have some pictures and I want to have a piece of text, like a label, for each one. I have tried floating both image and paragraph (<p>) and then assigning a negative margin to the <p> and setting its z-index: 100

but it continues to say below the image.

how do I get it ontop?

thanks
lworks
Similar Threads
Reputation Points: 15
Solved Threads: 2
Junior Poster
lifeworks is offline Offline
145 posts
since Nov 2007
Dec 2nd, 2008
0

Re: negative margins

Post some code that we can read, however, it should look something like
<div>
<p>Your text here</p>
<img.../>
</div>
Reputation Points: 21
Solved Threads: 26
Posting Whiz in Training
Rhyan is offline Offline
240 posts
since Oct 2006
Dec 2nd, 2008
0

Re: negative margins

Well if you had set the p's z-index to 100 then it should work but anyway you could just add text with an image editor(Gimp, inkscape).
Reputation Points: 13
Solved Threads: 6
Junior Poster in Training
ccube921 is offline Offline
93 posts
since Oct 2008
Dec 3rd, 2008
0

Re: negative margins

set position: absolute for <p>
Reputation Points: 83
Solved Threads: 61
Posting Pro in Training
Luckychap is offline Offline
442 posts
since Aug 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in HTML and CSS Forum Timeline: Web Developed in Dreamweaver Help!
Next Thread in HTML and CSS Forum Timeline: Downloading a File





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC