Jump to content

Having problems with DIV


Twentyoneth

Recommended Posts

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?

[code]<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>[/code]
Link to comment
https://forums.phpfreaks.com/topic/12616-having-problems-with-div/
Share on other sites

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.