We’re trying to create an HTML page that consists of masonry-style floated elements that contain a picture and title. The elements have a shadow and the page has a slight gradient background. Targets that have already been visited have a folded corner.

The folded corner causes a couple of problems:
1) How can we make the element’s box-shadow end before the folded corner on the right and bottom sides? Will we have to do the shadows the pre-CSS3 way with divs containing semi-transparent gradients?
2) How to do the folded corner itself? We can’t just impose an image on the right bottom corner on top of the white background, because the page’s background gradient must show through.
So far, I’ve thought of four ways of doing this:
Method 1: The idea behind this one is to use two pseudo-elements on the
.boxto get the corner and then two pseudo-elements on the.box-textto get the shadows in the corners right – demo. The biggest problem with this one is that it is… well, ugly.HTML structure:
Relevant CSS:
Method 2: combine shadows in a nicer manner using a skewed pseudo-element for that particular corner (I would have shadows on the pseudo-element) – demo
I think this one looks nicer and also has the advantage of working in IE9 as well (the previous one didn’t, since it made use of CSS gradients).
The HTML would be exactly the same and the CSS would become:
Method 3: I got an idea from the previous method – demo. I think the previous one looks slightly nicer though…
CSS that has changed:
Method 4: Uses just 2 pseudo-elements, both on the box – demo