Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2006
    Location
    United Kingdom
    Posts
    4,753
    Tokens
    1,860
    Habbo
    ,Alpha,

    Latest Awards:

    Default [CSS] Opacity to Border

    Hi,

    is it possible to add transparency to a border without it making the whole div going transparent? It's too create the following effect:



    (The border isn't a gradient btw just a solid colour with transparency).

    All help appreciated and +rep.

    Lee!

  2. #2
    Join Date
    Jan 2008
    Location
    Wales
    Posts
    3,594
    Tokens
    1,387
    Habbo
    Skizzling

    Latest Awards:

    Default

    black with 60 opacity: border: 1px rgba(0, 0, 0, 0.6) solid;
    white with 30 opacity: border: 1px rgba(255, 255, 255, 0.3) solid;

    and use the following if you want curved edges:

    -webkit-border-radius: 6px;
    -moz-border-radius: 6px;
    border-radius: 6px;
    Last edited by Calvin; 11-01-2013 at 07:18 PM.

  3. #3
    Join Date
    Oct 2006
    Location
    United Kingdom
    Posts
    4,753
    Tokens
    1,860
    Habbo
    ,Alpha,

    Latest Awards:

    Default

    Quote Originally Posted by Calvin View Post
    black with 60 opacity: border: 1px rgba(0, 0, 0, 0.6) solid;
    white with 30 opacity: border: 1px rgba(255, 255, 255, 0.3) solid;

    and use the following if you want curved edges:

    -webkit-border-radius: 6px;
    -moz-border-radius: 6px;
    border-radius: 6px;
    Hi calvin I'll try that! +REP.

Posting Permissions

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