Elsewhere: A valid XHTML & CSS Lightbox (no JavaScript)
This is brilliant. Amazing. Did I say brilliant? Now I’m figuring out how she did it. (Source)
This is brilliant. Amazing. Did I say brilliant? Now I’m figuring out how she did it. (Source)
Works great in Firefox, and it’s very clever. It doesn’t seem to work in Opera 10 though. Shame, because it’s such a great idea.
There’s a write-up of the method here: http://carsonified.com/blog/design/css/how-to-create-a-valid-non-javascript-lightbox/
This was posted on Stuff and Nonsense
Really? This is brilliant? Dangit! I have been using this since I learned about :target. Used it in some wireframes last night. I need to start writing stuff like this up!
Downside is there’s no way to close on ESC, which is a problem with most modal windows.
It’s very clever, and elegant. In Chrome on Windows, the Back Button shows the lightbox again. I’m not sure of a way around that.
@Brandon Durham and @KS
I am not experiencing any of these issues you are mentioning, could you offer some more details?
@Christopher Meyers - The modal doesn’t close when you hit “ESC”. Call it personal preference, but I think all lightboxes should close on ESC. I know that would introduce the need for Javascript, but I think it’s necessary.
Don’t get me wrong - it’s a really great method, and a really nice way to handle the possibility of Javascript being disabled in a browser.
@Brandon Durham Ahh, so the literal interpretation was the one I should have used. My bad. I can definitely see the value in the behavior you described, it would be a helpful .js enhancement on the CSS, as would a fade-in.
I do like the ability to back out of the modal using the browser’s back feature, although it is, currently, non-intuitive.
There are currently no tweet replies. Add one?
© 2004 – 2010 Stuff and Nonsense Ltd. All Rights Reserved. CSS released under CC Attribution 2.5. Hosted by (mt) and built on ExpressionEngine . Videos hosted by vzaar.