Jump to content


Photo

Having problems with DIV


  • Please log in to reply
1 reply to this topic

#1 Twentyoneth

Twentyoneth
  • Members
  • PipPipPip
  • Advanced Member
  • 118 posts
  • LocationGlasgow, KY

Posted 22 June 2006 - 05:42 AM

I am having a few problems with the <div> tag....

I have a background in a table....
I have a color overlayed on the picture...faded....so you can see the pic...
Then I have words on top of the color...

I don't want the fade on the words though, I have tried z-index, and it's not working for me. Any ideas?

<table cellspacing='0' cellpadding='0' border='0' width='437' height='319' style='background-image: url(images/contentbg2.png); border-style: dashed; border-width: 2px; border-color: #ffffff;'>
   <tr>
      <td>
         <div style='position: relative; top: 0; left: 0; width: 437px; height: 319px; background: #999999; filter: alpha(opacity=20); -moz-opacity: .20; z-index: 1;'>
            <div style='position: relative; top: 0; left: 0; z-index: 2;'>
               <center>
                  <font style='color: #000000; font-family: helvetica;'>
                     <b>
                        words here
                     </b>
                  </font>
               </center>
            </div>
         </div>
      </td>
   </tr>
</table>


#2 nogray

nogray
  • Members
  • PipPipPip
  • Advanced Member
  • 930 posts
  • LocationSan Francisco CA

Posted 22 June 2006 - 04:10 PM

You inner div (<div style='position: relative; top: 0; left: 0; z-index: 2;'>) takes the same opacity info from the faded div(<div style='position: relative; top: 0; left: 0; width: 437px; height: 319px; background: #999999; filter: alpha(opacity=20); -moz-opacity: .20; z-index: 1;'>)

Try to set the opacity of the inner div to 100%, if that doesn't work try to move it outside the faded div.

NoGray.com





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users