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
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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.