Results 1 to 6 of 6

Thread: Transparent over table

  1. #1
    Join Date
    Nov 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post Transparent over table

    Okay, this is probably a very simply code, but I cant seem to nail it D:

    I have an image that is half transparent, and I want the transparent area to overlap with a html table, so that both the small part of the image that is in the transparency and the table are both visible in the same field. I tried to use the absolute function with divs but I can't seem to find the right combination.

    Anyone?

  2. #2
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Z-index. negative margins. And you don't want absolute positioning. 2 absolutes make an absolutely wrong. Try relative
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  3. #3
    Join Date
    Nov 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks! I tried that and it worked just fine, but it seems that the space I'm trying to put it into (I'm designing a layout) is a html only space, so it seems to be ignoring the CSS coding. Is there any plain html version of the z-index?

  4. #4
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Use inline styles.
    Code:
    <div style='z-index:999;'>This is on top of everything</div>
    2 absolutes make an absolutely wrong.
    I like that.

  5. The Following User Says Thank You to Medyman For This Useful Post:

    bruglione (11-17-2008)

  6. #5
    Join Date
    Nov 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Sadly, that doesnt seem to be working either. Or possibly I have it placed in the wrong place, but I dunno. I tried to make the graphic z-index:999 just by itself, and nothing changed, and then I tried to make the graphic z-index:999 and the table z-index:-1 or something and nothing changed.

  7. #6
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    z-index by itself doesn't do anything. I should have provided a more complete example. Sorry. Z-index only works with elements that have are either relatively or absolutely positioned.

    So, try this:
    Code:
    <div style='z-index:999;position:relative'>This is on top of everything</div>

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
  •