negative margins

Reply

Join Date: Nov 2007
Posts: 81
Reputation: lifeworks is an unknown quantity at this point 
Solved Threads: 2
lifeworks lifeworks is offline Offline
Junior Poster in Training

negative margins

 
0
  #1
Dec 2nd, 2008
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
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 232
Reputation: Rhyan is an unknown quantity at this point 
Solved Threads: 24
Rhyan's Avatar
Rhyan Rhyan is offline Offline
Posting Whiz in Training

Re: negative margins

 
0
  #2
Dec 2nd, 2008
Post some code that we can read, however, it should look something like
<div>
<p>Your text here</p>
<img.../>
</div>
" Of all the things I've lost,
I miss my mind the most...."
Mark Twain
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 76
Reputation: ccube921 is an unknown quantity at this point 
Solved Threads: 6
ccube921 ccube921 is offline Offline
Junior Poster in Training

Re: negative margins

 
0
  #3
Dec 2nd, 2008
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).
Reply With Quote Quick reply to this message  
Join Date: Aug 2006
Posts: 319
Reputation: Luckychap is on a distinguished road 
Solved Threads: 42
Luckychap's Avatar
Luckychap Luckychap is offline Offline
Posting Whiz

Re: negative margins

 
0
  #4
Dec 3rd, 2008
set position: absolute for <p>
When you think you have done a lot, then be ready for YOUR downfall.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the HTML and CSS Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC