SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Zealot
    Join Date
    Oct 2001
    Location
    Nanaimo, BC, Canada
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    transparency question

    If I use CSS to alter a table cell's transparency, is there a way to make it so the text within the cell has a different opacity.

    For example:
    Code:
    <tr>
     <td style=filter:alpha(opacity=50, finishopacity=100, style=1, startx=0, 
     starty=0, finishx=140, finishy=270) height=15 bgcolor=#AE3D00 
     align=center><font color=black>Main Menu</font></td>
    </tr>
    How would I make it so the "Main Menu" text has no transparency?

  2. #2
    Typo Negative brokenvoice's Avatar
    Join Date
    Dec 2001
    Location
    Scotland
    Posts
    227
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would use a partly transparent 24 bit PNG as the cell's background that way your text is completely independent and you don't have to use CSS extensions.

  3. #3
    What? Maelstrom's Avatar
    Join Date
    Oct 2001
    Location
    Whistler BC originally from Guelph Ontario
    Posts
    2,175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by brokenvoice
    I would use a partly transparent 24 bit PNG as the cell's background that way your text is completely independent and you don't have to use CSS extensions.
    And also aren't those filters only available in IE. If you used a png it would work in more browser too
    Maelstrom Personal - Apparition Visions
    Development - PhP || Mysql || Zend || Devshed
    Unix - FreeBSD || FreeBsdForums || Man Pages
    They made me a sitepoint Mentor - Feel free to PM me or Email me and I will see if I can help.

  4. #4
    SitePoint Zealot
    Join Date
    Oct 2001
    Location
    Nanaimo, BC, Canada
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I didn't even know you could do that
    Can anybody tell me how I can make a partially transparent .png file in photoshop or psp? or give me a link to a tutorial?

    thanks
    Last edited by UTGraeme; Jan 12, 2002 at 21:31.

  5. #5
    Typo Negative brokenvoice's Avatar
    Join Date
    Dec 2001
    Location
    Scotland
    Posts
    227
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In Photoshop create a new image of 16x16 pixels with the contents set to transparent (or just a regular background but double click the Background layer in your layer palette to convert it to a proper layer). Fill the layer witha colour of your choice and reduce its opacity till you see the checkerboard shine through. CTRL+SHIFT+ALT+s (save for web) and select PNG-24 in the file type drop down box and make sure that transparency is checked.

    The only problem is, it wont work in IE as for some reason it has incomplete support for PNG files.

  6. #6
    SitePoint Zealot
    Join Date
    Oct 2001
    Location
    Nanaimo, BC, Canada
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok, then I'll just use a semi transparent png and use the css filter so it'll work in all browsers

    thanks, brokenvoice

  7. #7
    Typo Negative brokenvoice's Avatar
    Join Date
    Dec 2001
    Location
    Scotland
    Posts
    227
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No problem...I'd be interested in seeing it after your done.

  8. #8
    SitePoint Zealot
    Join Date
    Oct 2001
    Location
    Nanaimo, BC, Canada
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hey wait, my original problem was that the css makes the text transparent too... so that won't work.

    I'll look around to see how other people have done it

  9. #9
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try using a different class on the text then on the table cell.

    Sketch
    Aaron Brazell
    Technosailor




Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •