Follow us on...
Follow us on Twitter
Register
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Jan 2012
    Posts
    6
    Feedback Score
    0

    Shadows on a div

    Can anyone help with getting drop shadow on a div? I want to keep it outside, all over the div.

  2. #2
    staff Martin's Avatar
    Join Date
    Dec 2011
    Location
    Prague
    Posts
    348
    Feedback Score
    0
    You want it all over the box?

    try this:

    Code:
    box-shadow: 0 0 10px 10px #555;
    first two numbers are offset. if you want it all over the box, leave them both on zero value.
    next number is blur distance and then goes spread distance.
    last thing is color of the shadow.

    you can do this:

    Code:
    box-shadow: 0 0 10px #555;
    it's valid and you will get shadow all over the div with blur distance of 10px.

    change offset values to get it where you need it.

    Hope this helps

  3. #3
    Junior Member
    Join Date
    Jan 2012
    Posts
    6
    Feedback Score
    0
    thank you! no hack needed for crossbrowser functionality?

  4. #4
    staff Martin's Avatar
    Join Date
    Dec 2011
    Location
    Prague
    Posts
    348
    Feedback Score
    0
    you should use the prefixes:

    Code:
    box-shadow: ...
    -moz-box-shadow: ...  
    -webkit-box-shadow: ...
    fill them with the same as you did in box-shadow.

  5. #5
    Junior Member
    Join Date
    Jan 2012
    Posts
    6
    Feedback Score
    0
    thank you martin!

 

 

Tags for this Thread

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