Results 1 to 3 of 3

Thread: Opacity Help

  1. #1
    Join Date
    Jun 2007
    Posts
    18
    Thanks
    2
    Thanked 1 Time in 1 Post

    Question Opacity Help

    is there a way to make a div that does opacty from 100% to 40% from bottom to top...

  2. #2
    Join Date
    Mar 2007
    Location
    Tarboro, NC
    Posts
    290
    Thanks
    8
    Thanked 2 Times in 2 Posts

    Default

    You mean like a gradient? I think it would be easier, since I don't know how to do that, to make a .PNG have a transparent background from top to bottom and that should create the same effect if I'm getting you. As I said, I'm not aware of anyway to do exactly what you asked besides possibly many DIVs with different opacity until they reach 40%.

    Tim

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

    Default

    Quote Originally Posted by TimFA View Post
    You mean like a gradient? I think it would be easier, since I don't know how to do that, to make a .PNG have a transparent background from top to bottom and that should create the same effect if I'm getting you. As I said, I'm not aware of anyway to do exactly what you asked besides possibly many DIVs with different opacity until they reach 40%.

    Tim
    Vinny...

    Tim is correct. There are some experimental techniques to create gradients without using images, such as this (using PHP) and this (using javascript).

    The easiest way would be to create an image and apply it as a background or overlay it with absolute positioning (depending of the effect you're trying to achieve). An alternative way, as Tim points out, would be to create multiple block elements with varying color/opacity. But that would hardly be an effecient way to go if you want a smooth gradient.

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
  •