Search code examples
htmlcsswebhtml5boilerplate

Using CSS/HTML to build background?


Guys I have been trying lots of different options from cutting up to building in html/css. nothing seems to really work :(

How would you guys go about doing this ?

Link:- http://www.flickr.com/photos/gavinwynne/6902590869/


Solution

  • The simplest way is to use a thick border and a inset box shadow. Browser support is somewhat limited, though. It basically comes down to IE9+ and modern browsers (ref).

    demo

    body {
        min-height: 300px;
        border: 24px solid #666;
        box-shadow:inset 0px 0px 30px rgba(0,0,0,.5);
        -webkit-box-shadow:inset 0px 0px 30px rgba(0,0,0,.5);
        -moz-box-shadow:inset 0px 0px 30px rgba(0,0,0,.5);
        padding: 35px;
    }
    

    demo screen shot