Can I accomplish this with CSS?

Discussion in 'CSS' started by Skinny, Feb 25, 2007.

  1. #1
    Below is a picture of something done on another site. I want to do the same thing. How do I do this:

    1) An image is clicked.
    2)The page turns black with some transparency
    3)Another box appears with more content

    [​IMG]

    Can I do this with CSS or is this Javascript?

    Skinny
     
    Skinny, Feb 25, 2007 IP
  2. MattD

    MattD Peon

    Messages:
    161
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    This is usually done with a combination of CSS and javascript.

    The greyed out bit is actually a div that is the size of the browser window with a transparent image, with the "content" simply just another div within the greyed out div. Javascript is used to set the visibility of the greyed out div (i.e. changes from invisible to visible, and back again when it is closed).
     
    MattD, Feb 26, 2007 IP
  3. just-4-teens

    just-4-teens Peon

    Messages:
    3,967
    Likes Received:
    168
    Best Answers:
    0
    Trophy Points:
    0
    #3
    i would suspect it is done with both css and javascript.
    it could also be something like ajax or dhtml
     
    just-4-teens, Feb 26, 2007 IP
  4. AdamSee

    AdamSee Well-Known Member

    Messages:
    422
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    135
    #4
    AdamSee, Feb 26, 2007 IP
    Clive likes this.
  5. Skinny

    Skinny Peon

    Messages:
    1,864
    Likes Received:
    93
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks you very much for all your help.

    Skinny
     
    Skinny, Feb 27, 2007 IP