Create a Lightbox effect only with CSS – no javascript needed

You may call it Lightbox, or Greybox, or Thickbox, but it's always the same effect.

When you are on a page, and click on a photo or trig some event, a Lightbox is an effect that fades the pagein the background to show you new content in the foreground.

I mean this effect

Lightbox

In the upper example, when clicking on a photo the site fades to black and shows the photo, in the lower one when clicking on "login" the site fades to white and shows the login form.

There are tons of Lightbox scripts in the web, each one with its unique features and limitations, but all require massive use of Javascript or the installation of javascript frameworks.

In some cases, there are "lightweight" versions with "only" 40KB of Javascript.

This example does not want to compete with those scripts, but if you are looking for a simple, 100% CSS, 0% javascript lightbox, this may help you.

Features of this Lightbox:

100% CSS as said
You can insert any content in it (some scripts out there only allow images)

That's all. Did you need something more? Think wisely...

Let's start with the CSS

CSS:
  1. .black_overlay{
  2.     display: none;
  3.     position: absolute;
  4.     top: 0%;
  5.     left: 0%;
  6.     width: 100%;
  7.     height: 100%;
  8.     background-color: black;
  9.     z-index:1001;
  10.     -moz-opacity: 0.8;
  11.     opacity:.80;
  12.     filter: alpha(opacity=80);
  13. }
  14.  
  15. .white_content {
  16.     display: none;
  17.     position: absolute;
  18.     top: 25%;
  19.     left: 25%;
  20.     width: 50%;
  21.     height: 50%;
  22.     padding: 16px;
  23.     border: 16px solid orange;
  24.     background-color: white;
  25.     z-index:1002;
  26.     overflow: auto;
  27. }

The black_overlay class is the layer that will make the web page seem to fade. It's a black 80% opaque background as long and wide as the browser that will overlay the web page (look at the z-index) and at the moment is not shown (look at the display).

The white content class is the layer with the photo/login screen/whatever you want to appear in the Lightbox overlay. It's a white layer to be placed over the black_overlay layer (look at the z-index, greater than the black_overlay one). The overflow allows you to have a scrollable content.

In the html file, put this line just before the tag

HTML:
  1. <div id="light" class="white_content">Hi, I am an happy lightbox</div><div id="fade" class="black_overlay"></div>

Now, trig the action you want to open the Lightbox and insert this code:

HTML:
  1. document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block';

For example, in a link would be:

HTML:
  1. <a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block'">Click me</a>

Remember to include in the lightbox the code to close it, for example

HTML:
  1. <a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none'">Hide me</a>

A complete example page could be

HTML:
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2.     <head>
  3.         <title>LIGHTBOX EXAMPLE</title>
  4.         <style>
  5.         .black_overlay{
  6.             display: none;
  7.             position: absolute;
  8.             top: 0%;
  9.             left: 0%;
  10.             width: 100%;
  11.             height: 100%;
  12.             background-color: black;
  13.             z-index:1001;
  14.             -moz-opacity: 0.8;
  15.             opacity:.80;
  16.             filter: alpha(opacity=80);
  17.         }
  18.         .white_content {
  19.             display: none;
  20.             position: absolute;
  21.             top: 25%;
  22.             left: 25%;
  23.             width: 50%;
  24.             height: 50%;
  25.             padding: 16px;
  26.             border: 16px solid orange;
  27.             background-color: white;
  28.             z-index:1002;
  29.             overflow: auto;
  30.         }
  31.     </style>
  32.     </head>
  33.     <body>
  34.         <p>This is the main content. To display a lightbox click <a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block'">here</a></p>
  35.         <div id="light" class="white_content">This is the lightbox content. <a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none'">Close</a></div>
  36.         <div id="fade" class="black_overlay"></div>
  37.     </body>

That you can find up and running in this page.

In this example everything is static and preloaded, but you can easily add some php/ajax code to make it more dynamic while keeping the effect 100% CSS based.

Hope you will find it useful, should you use it in one of your works send me a comment and I'll feature your site as example.

Rate this post: 1 Star2 Stars3 Stars4 Stars5 Stars (156 votes, average: 4.53 out of 5)
Loading ... Loading ...
If you found this post useful, please consider a small donation.
» Template Monster offers you a great assortment of CSS Templates.
They can be a great start to launch a website of your own and meet the individual needs of your project.

234 Responses to “Create a Lightbox effect only with CSS – no javascript needed”

  1. Ben on August 22nd, 2007 6:54 pm

    Erm… no javascript? That title is very misleading. It’s a nice concept, and a good lightweight alternative to the libraries that are out there, but there is definitely javascript involved, and it’s non degradable.

  2. Izzy on August 23rd, 2007 12:40 pm

    Yes, the title is misleading… maybe somthing more like “Lightweight lightbox with CSS”, seeing as there are atleast two lines of javascript… and maybe 75% CSS, 25% Javascript would be a more appropriate range.

    A fantastic bit of code though, almost as good as some scripts I have seen, however, it doesn’t have a smooth fade, which could be added by having two darkening divs each on say 40% opacity, one opens on the click and the other on the loading/displaying of the lightbox perhaps… not sure how to do that myself, but I’m sure it can’t be too javascript intensive.

    –Izzy

  3. Sigh on August 23rd, 2007 12:48 pm

    Don’t you get it? By ‘no Javascript needed” he means “not that many Javascript needed”! Sheesh. By the way, the lightbox was great…

  4. Live TV on August 23rd, 2007 10:17 pm

    Ok well it does use JavaScript, but give him a break it’s still pretty good and maybe the title should have been “Create a Lightbox Effect with CSS and a tiny bit of JavaScript” but that probably wouldn’t have sounded as good.

  5. Kyle Fuller on August 23rd, 2007 11:38 pm

    The title says “no javascript needed” yet there was javascript. This is misleading, maybe you should change the title. Still it is good, very little javascript instead of most of it javascript.

  6. um on August 23rd, 2007 11:42 pm

    Most of the JavaScript effects also include many other options, such as automatic sizing, etc. ALL of them use CSS. How this got on Digg I have no idea.

  7. velinn on August 23rd, 2007 11:43 pm

    He did make a mistake with the title, but I think what he meant was that there is no Javascript framework necessary. Think Prototype, script.aculo.lus, etc. Some of these weigh in at almost 300k.

    Using two lines of standard javascript isn’t quite the same thing.

  8. Russell Heimlich on August 23rd, 2007 11:49 pm

    The main lifting of the Javascript is to manipulate class names. You just did what all of the other lightbox scripts do but yours is less bang for more buck. Good try though.

    I’ve been working on a custom lightbox script at work although it is more of a modal pop up since we don’t want the in-your-face fade down. Just a quick “display:block” that turns on and off a div holding the folder positioned absolute.

  9. Eryx on August 23rd, 2007 11:50 pm

    Great script! Simple and effective. what is the -moz- in your css? I know it is for Firefox but is it a way to comment?

  10. Foo on August 23rd, 2007 11:52 pm

    in mozilla, you could add a :hover class, and it would work without js. might be a little hard to use, though.

  11. Sashidhar Kokku on August 24th, 2007 12:11 am

    I tried using this sample for a form based webpage.
    If I use a server side button, and a click-event handler for it will close it irrespective of any other action.
    This implementation of the lightbox is good for a static (display only) webpage.
    Good job though.

    -Sashidhar Kokku

  12. Andreas Blixt on August 24th, 2007 12:14 am

    Yeah it’s definitely not CSS only. It IS possible to make a dynamic lightbox in 100% CSS, but it will be lacking fundamental functionality. I made the following example:
    http://css.mezane.org/lightbox/

    Click the thumb for the lightbox effect. Click outside to close it (this does not work on Safari because it doesn’t seem to pick up on :focus or :active pseudo-classes.) This can be expanded upon to not reuse the image in the document (you’ll notice it disappears while the lightbox is open,) but I made the solution completely degradable (otherwise there could be a second image that’s hidden in the CSS and then shown when needed.) The extra span element is undesirable as well and makes the source code look ugly. I don’t recommend this anyways. A CSS-enabled browser with JavaScript disabled (very rare) will simply have to live without lightboxes.

  13. Clint on August 24th, 2007 1:27 am

    This won’t work if the page has to scroll, man. You need to display this stuff ‘fixed.’ And it’s not very practical with your 25% sizing; images would not be vertically centered.

    Thing is, I think you know that, which is why your example is so simple. And if you want someone like me to donate, make a more robust example that works and I’ll consider it.

  14. Tyler on August 24th, 2007 1:49 am

    Yeah, you should change your title for this post. But your getting a lot of traffic from it so I cant blame you.

  15. Andrew on August 24th, 2007 1:57 am

    You’re just revisiting the days when people didn’t bother to make javascript unobtrusive like they should. This is a step backward, and it encourages other people to take a step backward (or more likely, to not take a step forward). This is the opposite of a contribution.

  16. willie on August 24th, 2007 2:07 am

    Ach, quit yer whinin’, ya bunch o’ babies. It’dunna use JavaScript.

  17. Kris on August 24th, 2007 2:18 am

    Not good.
    1.) It requires javascript to be enabled (this means non-degradeable), it means that the image will not be seen if JS is disabled.
    2.) Why would you want to do this for every object you want to include in a lightbox.

    here
    Close

    When you could just include any of a number of well tested libraries and just do this.

    lightbox

    If it’s size your concerned about I recommend looking into slimbox it uses the mootools framework and is under 7k.

  18. Rawstock on August 24th, 2007 2:30 am

    How about “Lightbox with css and inline javascript only”?

  19. Blake Brannon on August 24th, 2007 2:38 am

    Not totally free but reduced. Nice work here. How about “Lightbox effect with virtually no javascript”

  20. c on August 24th, 2007 2:43 am

    How cross browser is this technique though?

  21. Cadu de Castro Alves on August 24th, 2007 3:04 am

    Hi, Emanuele.

    I improved your technique. I removed all inline JavaScript and wrote unobtrusive JavaScript code. It works very well in Firefox and IE7.

    To make this technique more flexible, I included a function called getElementsByClassName, created by Jonathan Snook.

    See the example

  22. Magic Weaver on August 24th, 2007 3:53 am

    Geez… what a dup. I came here thinking it was 100% CSS but only to find it still involved JavaScript.

    Admittedly though it is a nice light weight idea and an alternative to the more fanciful version (lightbox, thickbox, greybox, etc.) out there, but there is a significant difference between this version and the fanciful versions, this CSS version has no graceful degradation should for some reason the client doesn’t have JS turned on or (heaven forbid) a JS incapable browser.

    Still I commend you on a good try, but the next time you come up with something, try not to mislead with your titles.

  23. anon on August 24th, 2007 4:41 am

    I’m going to go against the flow and say the title was accurate. No javascript was needed for the lightbox effect. You do need javascript to trigger the effect.

    Good work, I’m going to use this.

  24. faben on August 24th, 2007 6:32 am

    no javascript? Your a dumbass, your example is exactly how most greyboxes occur.

  25. Max on August 24th, 2007 6:58 am

    I will have to try it out, but that is definitely my biggest frustration, I cannot stand cross browser incompatibility. Has anyone tried to see if this works well in IE, firefox, safari, and opera?

    Max … Out!
    http://www.cmyos.com – free online operating system

  26. Tom Howard on August 24th, 2007 7:13 am

    Close but no doughnut.

    Here is a real “no javascript” lightbox example

  27. Gopinath M on August 24th, 2007 7:49 am

    I’m searching for this script on net for long time. It’s very simple and superb. You are genius(in case if you have written this). Thanks a lot buddy :)

    Cheers
    http://mgopinath.blogspot.com

  28. Mat on August 24th, 2007 8:21 am

    Andreas Blixt > Your CSS lightbox effect doesn’t work with Opera 9.2 browsers.

    Misleading title but good work.
    Thank you

  29. Dusan Smolnikar on August 24th, 2007 9:14 am

    I don’t know how other alternatives work, but I was working with a lightbox very similar to yours lately. With one difference, I had a few select fields (<select>) on my page, which seemed to overlay everything in ie (ie6 for sure, but I think ie7 as well). They would display over the .black_overlay and .white_content. The only solution I could find was to put an iframe under white_content, which is quite ugly and still wouldn’t fix selects displaying over black_content.

    Has anyone else had a similar problem and found how to avoid it?

  30. Ingus on August 24th, 2007 9:35 am

    If we don’t look at the misleading title there are some serious problems with the code:

    1) if you add more content to the sample page and need to scroll down content and see the box in the scrolled area, you can’t because the absolutely positioned box is above the visible area. And despite the fact that you open it, the visitor does not even notice it.

    2) if you open the box and there’s enough content, you can scroll away the box.

    I prefer jQuery with a modified jqModal plugin.

  31. 10668844 on August 24th, 2007 10:01 am

    works great, thanks!

  32. Moby on August 24th, 2007 10:04 am

    The “onclick” event is a DOM event. It may call JavaScript, or some other sort of scripting language that may be available to the browser. It may also access DOM attributes and modifiy them, as in this case. But is not necessarily JavaScript.

    http://en.wikipedia.org/wiki/DOM_Events

  33. sazwqa on August 24th, 2007 11:01 am

    well had tried similiar things in the past, but not a foolproof option though. Lightbox and other scripts handle modal window professionally and a far better way, have no issues with almost any browsers and scroll thing.

    I think geeks cud use this script for showcasing but for hard-core wannabes its a sure shot NO !

    ~sazwqa

  34. Sam Liddicott on August 24th, 2007 11:08 am

    href=”javascript:……

    is a wicked sin.

    It should be

    href=”image.jpeg” onclick=”……; return false”

    So if no javascript, folk still get the image.

  35. fLUx on August 24th, 2007 11:22 am

    VERY nice, so nice in fact I’ve started to incorperate it into a site I’m building:
    http://muuveee.com/img/muuveee_login_box.gif
    (I would give you a link to a real demo, but its only currently on my localhost/devbox ;)

    When somebody clicks the “Login” link, up pops the box, click out of the box, it goes again, sweet! ;) and I’ve make it into an element using the framework I’m building, so where ever I need a login link, its ready for me in ~10 characters! =)

    10/10, simple, easy, and quick! Cheers!

  36. Ozh on August 24th, 2007 11:33 am

    Not only your technique DOES use javascript (hell, the *first* thing you gotta see on your example is a link pointing to javascript:void() !!) but it is not even usable with javascript turned off, which is what alternatives are exactly good at.

    Honestly I don’t see the point of this.

  37. Godspeedphi on August 24th, 2007 12:41 pm

    1) This lightbox method uses CSS
    2) This is not new
    3) i just wanted to list 3 things

  38. Simon on August 24th, 2007 1:34 pm

    Yeah, Very misleading, it blatantly uses javascript to show the box, so it is pointless.

    You might be able to get the same effect working by using different overloaders for a:hover and a:visited to get the same effect, but I think the point about the javascript ones were that they do not necessarily load the content until requested, so save bandwidth that way – doing a full CSS option would negate that.

  39. Sean O on August 24th, 2007 4:05 pm

    Another vote for _Misleading title designed for linkbaiting_.
    “No javascript” means… no javascript. Especially not inline, obtrusive javascript.

    @Tom Howard:
    No donut for you either as your linked example is worthless if it doesn’t work in IE, like it or not.

  40. Aaron on August 24th, 2007 6:19 pm

    You are using JavaScript, fool!

  41. Raspu on August 24th, 2007 8:43 pm

    I haved made exactly the same by my own a few days after visiting this website… =P

  42. Jeremy on August 24th, 2007 10:58 pm

    Doesn’t work right in IE with XHTML transitional doctype

  43. Leo on August 24th, 2007 11:46 pm

    *yawn* This is what happens when the person first discovers the idea and starts playing with it. Later you will discover why your implementation is too limited and won’t work in the real world for big web sites. It doesn’t handle IE select bug. I am 70% sure it will break on pages with scroll bars, or will only work OK on some browsers but not the others when the scroll bar is up and the user scrolls the page.

    To get this just right is not that easy. Even a big popular site like reddit.com has a very crappy lightbox. You can scroll down once it appears and click on the page below.

    I actually implemented a lightbox that is more or less bulletproof, but obviously it’s not as lightweight as yours. The idea is that not all javascript is evil. Some of it comes from the fact that you know about web development and are covering more use cases. Just because there is some javascript doesn’t mean the person is just adding bloat. I’m amazed this actually got upvoted so much on digg, since it’s an amateur attempt.

  44. dancecommander on August 25th, 2007 1:05 am

    0% javascript. um no. those code samples you have labeled ‘HTML’ contain pleeeenty of javascript. cool trick through for sure. it does not degrade naturally… yikes.

  45. Jimmy on August 25th, 2007 1:17 am

    How do you do this w/ 2 links and want it to display 2 different items

    Ex. link 1 will display 1 item, and link 2 will display 2nd item.

    Thanks,
    Jimmy

  46. Trevor Haagsma on August 25th, 2007 6:15 am

    Hi there, very nice post, but im having a problem implimenting it on my website in currently building, it only displays the fade effect on half the website, I cannot get it to cover the full site… is there a solution at all to that or is that the lack of CSS??

  47. Ron Later on August 27th, 2007 1:47 am

    I’m a user not a creator and I rarely comment on other people’s work in a negative way but:
    I have seen very similar years ago when I played around with animated emails.
    I was impressed with such things then but now I’m not, the average user doesn’t care how effects are created or I suspect even notice them.

  48. Tom Howard on August 27th, 2007 4:56 am

    @Sean O:
    I agree it’s useless for real life use, but it’s meant to be a proof of concept to demonstrate what can be done with JS alone. I could have compromised and simulated :target in IE using JS, but that would have defeated the whole purpose of the demo.

  49. Ryan on August 27th, 2007 7:57 am

    Bullshit you liar. Hehehehe!

  50. scancode on August 28th, 2007 6:21 am

    I really liked Andreas Blixt’s ligthbox… 0 javascript… yours is cool too, but the I thought NO JAVASCRIPT NEEDED meant NO JAVASCRIPT NEEDED. Good job anyway, you got your cookie!

  51. charles on August 28th, 2007 7:53 pm

    I don’t know if anyone else mentioned this, but when I cross browser tested the code, there is a white strip on the right hand side of the browser in IE6 for PC. It is an easy fix though, just change the body tag to:

    …then it works fine in IE7, IE6, Firefox and Safari!

    I also noticed some issues with centering/scrolling in some browsers, a minor problem, however It may be worth checking out!

    Thanks for contributing your efforts, Ignore all the negativity, keep hacking away at the problems (and please change the slightly-misleading title)

    Good work….
    Thanks

    -Charles

  52. charles on August 28th, 2007 10:38 pm

    Ah…

    I just noticed no one can see thee code I included, I forgot about the “html injection prevention” most sites have, anyway just add a margin of 0 to the left, right, top and bottom for the body tag…

    -Charles

  53. Josemi on August 28th, 2007 10:51 pm

    Thanks, it works!!! i’m going to use in many sites!!!!

  54. Steve on August 29th, 2007 2:45 pm

    very nice, still needs javascript but nice and light and does the job. Good post

  55. Tippi on August 31st, 2007 3:22 pm

    This is nice, i tried to write something like this without the scale and fade-in effect but got the the problem to cover the whole screen with the 80% layer. However you seem to have it worked out and very lightweight to, this for sure will come in handy since im sick of the fade in stuff that takes 2-3 seconds per image to scale and fade and AHHHH!

    Thanks :D

  56. Tony Cai on September 1st, 2007 10:30 am

    Hi,

    Awesome work, for those of you who wants to see it working in a real functioning website. See mine! It has made my site that much more pretty on the eyes!

    URL: http://www.sbuguide.com/
    CLICK ON THE CONTENT BUTTON.

    If you make the boarders and padding smaller, the box looks more centered. I have mine at 5px.

    Tony Cai
    http://tonycai.com

  57. c grigore on September 10th, 2007 1:50 pm

    check here
    http://tanny.ica.com/ICA/TKO/test.nsf/suckerfish/examplefix3.htm

    it seems that the selectbox is hidden.

  58. Andrés on September 12th, 2007 3:30 pm

    Great! That’s what I was looking for!

  59. Dan on September 21st, 2007 10:16 pm

    Give the guy a break! So maybe it isn’t 100% perfect for every single browser and its not 100% js free, but it is only 2 LINES!! Compared to many other solutions, this is f**k to achieve a nice effect that has many applications. If you need more functionality or cross compatibility then use another solution.

    People should appreciate the fact that guys like Emanuele are prepared to actually share their experiences with people.

  60. Makis on September 22nd, 2007 2:24 pm

    Hi guys,

    Based on your work I created a lightbox to load a flash file. I call is SWFbox – you can find it here:
    http://www.makesites.cc/programming/by-makis/swfbox/

    If you can make further improvements on it please be my guest.

  61. yook on September 23rd, 2007 1:14 am

    Looks like all the Javascript does is turn the display: none into display:block for both divs. You could easily do this with PHP instead of javascript. What I did was just keep display: block in both classes and when I want the lightbox, just dynamically include the divs on the page with PHP.

    Or if you really want just a 100% CSS solution.. you could just link to static pages with the lightbox divs coded in. Doubt people would even notice.

  62. Rafael Vale on September 25th, 2007 11:27 pm

    Thanks a lot bro! Congrats, its really clean and better than lightbox.

  63. Revathy on September 29th, 2007 11:49 am

    Superb….Very Useful too…

  64. Dale Hay on October 1st, 2007 12:56 am

    I agree, a bit miss leading on the title considering I see a bit of Javascript. :p

  65. Aaron on October 11th, 2007 7:19 pm

    I’m mexican, and I would like to thank you for the guide to make the efect, I’ve been searching an other like this but in your site is that I need for my page. Excellent!!!
    If you have a pdf tutorial or something like that, where I can learn the css language could you send me by mail please??

    Thank’s a lot, very nice!!!
    Sorry for my English it’s not very well

  66. Chad Wagner on November 10th, 2007 12:17 am

    I just implemented this and loaded some content via a prototype ajax request, and it functioned perfectly!!!

    Thanks, I have never found such a simple lightbox, and this is it!

  67. RFarce on November 15th, 2007 11:09 pm

    Implemented and lovin’ it. The title “no javascript required is spot on”. It didnt require me to code any javascript at all…..copy and paste. Alot easier than those other libraries which need to be configured.

  68. foysal on November 18th, 2007 5:21 am

    Thank you very much.

  69. Tim Connor on December 1st, 2007 8:32 pm

    WORST, LEAST degradeable JAVASCRIPT lightbox I have seen in quite a while. If you are going to go that ugly inline approach, at least keep the href pointing to the image and add an a return false to the end of the onclick. And you are adding the same kilobytes, just manually to your html, where it can’t be cached just once in a js file.

    And the title is false, a blatant lie and misleading. It’s fine for those of us who know better, but for the noviates it’s aimed at…. Basically this is bad google baiting/trolling. I assume the author knows this too, based on the good google results for “css no javascript” posts get and the out going links to a commercial site.

  70. lunakizz on December 7th, 2007 6:58 pm

    thx a lot!! It’s really useful

  71. Alan on December 9th, 2007 1:51 pm

    Hi to everybody!
    I just want to say that I did an adaptation to call lightbox v2 from flash movies, if you want to check it go to:flash lightbox v2
    Good work!
    Alan

  72. Lord XeöN on December 12th, 2007 9:13 pm

    Hi, every body :-)

    Thanks a lot for that nice solution : very simple and efficient :))

    So long…

  73. Michael on January 3rd, 2008 8:12 am

    This is just what I was looking for THANK YOU for making it available to the public!!

    Michael

  74. Palani Samy on January 4th, 2008 3:58 pm

    Thank you very much for this script. I have been searching for this script about 5 hours. Finally i got a right script over here.

  75. parsi on January 5th, 2008 10:09 pm

    I tried your lightbox, but it sits under my flash header… that means the flesh header is covering up the box. I think this have something to do with z-index in css but as I can see it is set up on 1001, so I guess there is no point of putting higher number. :) Does anybody have similar problem or solution for this?

  76. gagle on January 21st, 2008 6:16 am

    >parsi

    Add to FLASH param:

  77. css webdev on January 24th, 2008 3:29 pm

    Hello,

    very cute little thingy, will try to replace those javascript intensive lightboxes.

    Nice work!

  78. Brian on February 1st, 2008 1:18 pm

    You guys are so outa ir – This guy makes up sum thing which u can use FREE. Dont dis him and dont compain. he is not chargin u to view it. And plus the concept can be easily improved.

    Think a bit

  79. justin on February 3rd, 2008 7:33 am

    wow you guys bitch alot… why even bother posting anything if you guys are so damn quick to jump down the dude’s throat.

  80. silencio on February 3rd, 2008 2:08 pm

    @Brian, well, except he’s trying to improve on what were improvements on this original idea he apparently considers too bloated and on top of that feels the need to exaggerate a claim that is not true. e.g. Slimbox plus dependencies (mootools) weigh in at a lovely 26kb, is feature filled, not as glitchy, definitely gives off the polished look, and degrades nicely. Uses mootools, but will it kill you to use a javascript framework that (for slimbox) weighs in at 19kb? Also, what’s with the big concern over size..after all, one of the more popular uses of this particular technique is for displaying..oh, images. I highly doubt those images would weigh in at under 26kb, so if it makes so much of a deal to your end users who are all on dialup or something (i mean, look, you might even save some bandwidth in the long run as they get cached)…

    I think most of the grumbling is coming from the crowd expecting 0% javascript and seeing inline javascript only after beginning to read this post, and not even a good example of what the author was trying to illustrate. It was a waste of time, that’s why everyone’s complaining. :)

    Also I might point out that pretty much all of the Lightboxes out there are also “free”, and that the author comes out pretty strongly against pretty much all of them on the basis of being bloated/unnecessary/using frameworks..you know, also known as complaining. Soooooo…

  81. Tom-cat on February 4th, 2008 3:07 am

    The script is cool and pretty simple. I was just wondering how or if I could implement that same code in the following example:

    I want the page 5list.htm to be the white content
    on page load. I dont want someone to have to click on it.

    Like if I go to http://www.ww90990.com as soon as the
    page comes up, I want the white content to load with the black overlay.

    Can you tell me what code I would use instead of onclick. The exact code, if you will. Because I am using onload, but it is just not working right.

    Any help and assistance would be great.

    Thanks

  82. solitario on February 10th, 2008 8:41 am

    I think this is great. I’ve been looking for a barebones lightbox script that i can customize. thanks.

  83. Digg Sucks on February 10th, 2008 8:42 am

    Anyone else think that Digg traffic is inherently useless?

  84. uttam on February 23rd, 2008 3:54 pm

    Thanks…..
    It working fine in mozila but in IE i am facing problem.

    There is another divs in my page. it dosen’t get overlap.

  85. Ricardo on February 28th, 2008 12:08 am

    Great!!!!

    simple and efective

  86. R i C H a r D on February 28th, 2008 5:51 pm

    great it works

  87. Josh on March 15th, 2008 10:54 pm

    Just curious, how would to go about making the blacked out layer 100% of the webpage, instead of just the size of the screen? i used this on a page that was longer and if you scroll down the black div just ends..

  88. rep on March 16th, 2008 8:52 am

    You answer to parsi was cut off. What was you solution to the Flash problem parsi hand?

    Thanks in advance.

    >>> I tried your lightbox, but it sits under my flash header… that
    >>>means the flesh header is covering up the box. I think this have
    >>>something to do with z-index in css but as I can see it is set up
    >>>on 1001, so I guess there is no point of putting higher number. :)
    >>> Does anybody have similar problem or solution for this?
    >>>
    >>>gagle | Jan 21, 2008 | Reply
    >>>
    >>>>parsi
    >>>
    >>>Add to FLASH param:

  89. dewaji on March 22nd, 2008 5:46 pm

    Very nice tips. And theres no mootools or something heavy. I like this much. Thanks

  90. lol on March 22nd, 2008 8:08 pm

    cuz i digg it

  91. Izzy on March 23rd, 2008 7:22 pm

    it would be much better if the position of both the black_overlay and the white_content was set to “fixed” instead of “absolute”. This means that you don’t get Josh’s problem where the black overlay runs out if you scroll down.

    If you leave the white_content’s position attribute as absolute, you can make the shade stay there, but the white_content stay where it is and scroll off the screen.

    Hope this helps someone!

    Izzy

  92. Scott Elliott on April 4th, 2008 8:25 am

    The problem here is that if you use the javascript the end users can get a warning that turns them away from the site. No means No not oooooh a little bit’s OK.

    Nice effect bad title

  93. lupu.slobodu on April 4th, 2008 10:44 pm

    superior work, elegant, the best out there man

  94. nealc on April 11th, 2008 4:18 am

    Hey, I tried the lightbox on a new site design, but I can’t get it to work where there is more than one image being clicked, with a different image per thumbnail–they all share the same pic. How can I make it so I have multiple images (like 14 or more) on a page, with different respective counterpart images in the lightbox?

  95. ronnie on April 15th, 2008 9:15 pm

    Give the man a break. Who cares if their is some JS. Its a great alternative.

  96. wheres me jumpa on May 5th, 2008 5:56 pm

    mmmm title is misleading, however it was just what I am after. Tip of the cap kind shrew.

  97. Snark on May 6th, 2008 11:23 pm

    Thanx for this very best ModalBox on Planet!!! Work perfect on Windows XP/2000 with

    IE 5.01(!), IE 5.5, IE 6, IE 7, Opera 7,8,9, Safari, Firefox, Netscape Navigator

    Only old browser can not realize the opacy filter function, but the box have correct porsition and size with a black background! Perfect!

    Namastey
    Snark

  98. Snark on May 6th, 2008 11:28 pm

    Activate opacy on Linux systems with Konquerer

    Add on CSS:

    -khtml-opacity:0.7;

  99. Ab on May 15th, 2008 6:27 am

    What a bullshit article. I guess the author does not understand what “percent” means.

    This is not 0% javascript.

  100. elf boy on May 17th, 2008 4:50 am

    So I put a video in the box, and that works fine, except for when I close it. After I close it, the sound continues to play. Any help?

  101. steve on May 19th, 2008 1:47 pm

    yeah I think we have now clarified that it does use a ‘tiny’ bit of javascript but whatever…

    …can someone help me out on how to make this work if the page scrolls??? clint mentioned something about using ‘fixed’ display…any comments welcomed!! At the moment it would appear to only fill the screen dimensions anything else does not get covered by the black box???

  102. Eqqy Designs | Vancouver on May 21st, 2008 9:14 pm

    Nice little script you got there. Sure it needs some javascript, but hey, this is still an alternative form of lightbox.

    Thanks for sharing!

  103. jai on May 27th, 2008 11:58 am

    maybe it doesn’t even matter if there is javascript or not! just a line or two it still works doesn’t it? all you who don’t appreciate how amazing this is for me! i think i’ll put this on my website its so amazing!

  104. jai on May 28th, 2008 8:30 am

    Does this work for multiple Lightboxes? (not at the same time, just different links on a page to open a lightbox with different content)

  105. alastor on May 29th, 2008 7:37 pm

    @Tom Howard:
    BIG donut for you!!!

    if your PoC could degrade in IE to thumbs that point to larger versions opening another window it would be perfect, and is what we should do from now on, design for sane browsers and degrade to IE (in a ugly way! consistent with an ugly browser).

  106. AnonaMe on May 29th, 2008 9:44 pm

    Sorry if this has been addressed already…i didn’t feel like reading the thousand comments that complain about the F’ing title.

    Forms with select options underneath the lightbox show through in IE. Firefox works great for what i’m trying to accomplish…any idea’s on addressing the select in IE tho?

  107. AnonaMe on May 29th, 2008 9:49 pm

    yes it does…just give them different id’s ex.
    #
    This is the lightbox content. Close
    #

    #
    This is the lightbox content. Close
    #

  108. weilin on May 30th, 2008 4:15 am

    Wow cool!

  109. Marcelo on June 1st, 2008 2:26 am

    Exactly I was searching for my login page! People sometimes forget to keep things just simple.

  110. Gus on June 13th, 2008 3:42 pm

    greta, the css is not valid :/ ….

  111. Kirsten on June 26th, 2008 8:36 pm

    Man, people are such whiners!

    As someone who was asked to implement a simple lightbox for her organization’s site, and isn’t very comfortable with JavaScript, I’m very grateful that you created this and shared it with the world. The amount of JavaScript that there is or isn’t in what you published is perfectly fine with me. The JavaScript required for a “real” lightbox is over my head, but I think I’d be able to implement this. Thanks!

  112. John Masone on July 1st, 2008 12:20 am

    I got this code working pretty easily with an iframe instead of a div. BUT the last issue I seem to be having is, the “lightbox” is always the size of the browser window, but its always at the top of the page, even if the page is scrolled somewhat when the initial link is clicked. Is there someway to change this behavior? So that the lightbox (and blackout) are always centered on the browser, at least the browser as it is when you click. ?

  113. Peter on July 1st, 2008 4:01 am

    Suggest if you use position: fixed in both classes the lighbox and overlay will remain stationary when scrolling the page.
    Unfortunately this only works in IE7 when using Strict DTD

  114. Muhammad Tariq on July 3rd, 2008 6:45 am

    Nice Tutorial i am very happy. Thanks

  115. Kiran on July 7th, 2008 11:23 pm

    I have some select boxed and frames in my pages and the light box doesnt work as it should.

  116. Kiran on July 7th, 2008 11:24 pm

    I forgot to add. Try in IE with a select box in the main content.

  117. Tamesh on July 9th, 2008 8:34 am

    Its very cool but it doesn’t support DDT doctype,
    how is it possible.

  118. Tamesh on July 9th, 2008 8:57 am

    i have an issue, when the browser content is bigger then the black background has not covered the whole screen of the browser.

    anyone plz solve this issue.

  119. Stasan on July 31st, 2008 1:41 pm

    It’s great. Sorry for me grammar. I’am from belarus. May I translate this lesson to Russian. And publish it in web. It’s often need, but no so good tutorials on Russian language. Of course I will write that real author Emanuele Ferontano and I only translator, and publish link for this page.

  120. Emanuele Feronato on July 31st, 2008 2:33 pm

    Sure, stasan!

  121. Stasan on July 31st, 2008 2:58 pm

    Thank You!!!

  122. Matthew on August 1st, 2008 6:49 am

    Excellent, excellent work! I love the lightbox concept, but each version I’ve looked at so far (GreyBox, LightBox, etc) has been based on some idiotic javascript framework with 1000s of lines of code. This version is just beautiful, you get the same exact effect (even better, since it doesn’t have the annoying animations) with code you could write on a napkin. Thanks guys!

  123. will on August 13th, 2008 3:48 pm

    when more than one images are on the same page, when clicked on, they all load the same image in the ‘lightbox’. Is there a way around this? Great code by the way, will be even more useful if it works for multiple images on same page (about 10 images per page i need for portfolio example)
    Regards

    Will

  124. will on August 13th, 2008 5:42 pm

    ah solved it now – novice error just had to id each image differently. Looks fantastic thanks once again.

  125. Sonneries mobile | Buzzado on August 15th, 2008 2:59 pm

    Wow ! I really love this alternative.

    (No matter the title……. it helps me to find your article on search engine !) ;)

    Thanks. Lea.

  126. John Fonseka on August 23rd, 2008 11:04 am

    The title “No Java script needed” is misleading. but the work he did is greate coz java involved here slightly. Otherwise we also must be know that without java, only css cannot do this!!!

  127. Farmer on August 31st, 2008 6:31 pm

    Despite being slightly misleading, there is no need to set-up js frameworks, and so this is a brill solution for implementing lightbox-type effects in iframes (for iWeb and the likes).

    Granted, it’s a basic solution, but as far as I can work out, its the only way to implement such effects without calling up external scripts.

    Been trying to implement it into a site I’m working on in iWeb…
    http://www.webmywedding.co.uk/products.html

    Go easy – I’m only a hobbyist, and the site is still in development!

  128. web design egypt on September 18th, 2008 10:58 am

    nice script! i will try it in my next project

  129. Linuxjetty on September 19th, 2008 8:22 pm

    Hi,

    Thank you for nice work and not adding libraries or junks that’s why I preferred your code out of all lightbox 2, 1, jquery lightbox, prototype.js etc etc.

    issue # 1)
    height in percentage doesn’t work when page height is longer.
    Solution: Define exact height of page in pixel solved that problem.

    issue # 2)
    with flash it doesn’t work normal especially vertical and horizontal alignment.
    solution: add table with one cel across popup div only and define exact height and width, well running out of time honestly i already have tried 7 light box from web sites all were junk your one found best will paste whole code someday later.
    issue # 3)
    I could not solve yet is: if ucrrent browser window is half or full or increasing or decreasing height wise this div should float vertically center/middle.

  130. Iain Wood on October 6th, 2008 9:49 pm

    Really Useful

    FYI changing the position property from absolute to fixed solved the scrolling problems as far as im aware!

    nice will use this a lot!

  131. usedit on October 15th, 2008 2:44 pm

    js or not js, it works where I needed it. Thanks.
    Please add: height:4000px; in a conditional IE <=6 statement for the background div, the 100% won’t work on IE6.

  132. usedit on October 17th, 2008 11:04 am

    js or not js, it doesn’t works where I needed it. Thanks.
    Please add: height:4000px; in a conditional IE <=6 statement for the background div, the 100% won’t work on IE6.

  133. Efecto de lightbox solo con CSS on November 7th, 2008 9:00 pm

    [...l efecto de Ligthbox, pueden usar esta técnica utilizando únicamente CSS...]

  134. sanju on November 9th, 2008 11:46 am

    Very helpful one

  135. ropo on November 18th, 2008 3:44 pm

    position: fixed does not work for me because my HTML is not strict and I cannot change it. I will try setting body {overflow: hidden;} now …

  136. ropo on November 19th, 2008 3:51 pm

    ok. setting overflow hidden on the body worked for me. also I needed to scroll to the top with scroll(0,0). now it looks good

  137. riri on November 28th, 2008 12:12 pm

    thanks to share this, very helpful!

  138. mobilya on December 13th, 2008 12:27 pm

    Very nice Lightbox Content tutorial..

  139. alex on December 14th, 2008 8:05 pm

    there is no javascript needed.. the point of the title was to say that to have the lightbox positioned properly on the screen there is no javascript needed to detect browsers, or position divs or whatever, such as the jquery thickbox library.

    of course you need javascript to control the opening and closing of the lightbox, anyone who opened this article thinking as much should give up web development LOL

  140. Manny on January 12th, 2009 9:30 pm

    how to disable page shadowing effect, just show only popup image? (css popup)

  141. Sumit on January 19th, 2009 5:30 pm

    Thanks a lot. Now, I have learn how to create a Lightbox.

  142. Live Frame on January 20th, 2009 5:25 pm

    Not pure css, but good work. I use
    Visual LightBox, VisualLightBox.com to setup
    Lightbox script and thumbnails. Will your implementation work with VisualLightBox?

  143. TylerDurden on January 21st, 2009 6:09 am

    I wonder how many idiots are out there with no money and no brain to do their own effects.

  144. Mark SKayff on January 24th, 2009 8:50 am

    Hi Emanuel. Thanks for your Technique. It’s very good. It was really helpfull.

    I want to enphasise the positive aspect, that is all. Of course, it uses a little inline Javascript to manipulate the DOM. Othewise, nothing would happen.
    Well, best for you! And wait you feature a new one in the future with some more javascript ammount there…

  145. certwert on February 14th, 2009 5:08 am

    Absolute lifesaver. Thank you so much.

  146. Claus on February 19th, 2009 3:37 pm

    It seems that if you have a long page and you’ve scrolled down and then launces the layer – it’s only visible at the top of the page? Then you have to scroll back up?

    How to get around that?

  147. kidd on February 20th, 2009 7:31 am

    coool.. no need of an external js

  148. nebulae on February 26th, 2009 7:33 am

    loves it. Super lightweight, that’s exactly what I’m looking for. no scriptalicious or mootools or jquery or prototype required; seriously, 300k + for a nice looking modal is overkill. this is perfect, thanks! I can easily modify the concept to fit my needs exactly.

  149. ramesh on March 10th, 2009 1:41 pm

    hi, its great. but all the problem is with IE 6.0. The lightbox effect does not working fine if there are SELECT boxes. Try that.

  150. Andy on March 20th, 2009 7:29 am

    Hey, this is a nice example, but if I have a Flash (.swf file) in my web page the light box just goes below the Flash file, I tried to overcome this by using Z-index , but its not working , let me know if anybody has a reslove/fix for this ..
    Cheers .. .

  151. Stas on April 2nd, 2009 8:52 am

    Andy, try add to swf function this param

    or

  152. senthil on April 3rd, 2009 1:14 pm

    Nice ariticle

    I tested cross browser the code, there is a white strip on the right hand side of the browser in IE6
    remains are IE7, IE6, Firefox and Safari works fine how to solve this one.

  153. Jordan Dobson on April 19th, 2009 1:26 am

    Those of you that are having problems with flash need to add a “wmode” to your flash embed code. Adding something like this property should work and then allow you to z-index the position.

    wmode=”opaque”

    Without it your flash will always be on top of everything else. That’s the default.

  154. CodeMonkey on April 22nd, 2009 1:48 am

    I can’t believe peeps here are giving the author grief about whether or not this contains javascript. As far as I’m concerned, it doesn’t. A couple DOM calls versus all those bloated 100k+ .js files out there you’d have to add is NO comparison. Oooooh, and if the browser can’t handle javascript, it won’t work.

    Can’t write a check yourself? Jeez.

    Well done sir. This is exactly what I’m looking for!

  155. Matt on April 24th, 2009 8:35 pm

    Ok..you claim you have no JavaScript fine..you do whatever, however then you go on to say your using AJAX…which is “Asynchronous ..here it is…JAVASCRIPT and XML” learn your terminology retard.

    you destroyed your own argument of no javascript..good job.

  156. CarLam on April 26th, 2009 11:52 pm

    I’m a student designing my first websites and I really wanted to integrate a lightbox into my pages. Your script is simple and easy to manipulate. Thank you for sharing your gift!

  157. Keith D on May 23rd, 2009 3:23 pm

    Great little tut

    I’m always wondering if I should use javascrpt or not.

    This might be the solution to achieving the same effect.

  158. sarah on May 26th, 2009 9:12 pm

    i’m trying to make this work for my website but can’t really quite get there. i already have my links set up and just want the lightbox to work iwth them. instead of against them. its just not working out.
    my current link tag is this



    _______ where i’d want each “box” class be a link to a lightbox. how exactly do i intergrate this. HELP! plzzzz i would really appreciate it.

  159. sarah on May 26th, 2009 9:14 pm

    ooook… i duno why it didnt’ show up.

    its a div inside a few divs. i just dont’ know where to put this new div to make it work.

  160. John Doe on June 1st, 2009 6:11 am

    Why is everyone complaining about this script using “javascript:void(0)”

    If you do not want this javascript statement in the page, you can replace it with “#” and it will still work PERFECTLY fine without
    “javascript:voice(0)”

    And as someone previously stated, onclick=”" is a DOM event.

    I personally use this script and I have no problems with Firefox and IE7 or IE8 using “#” as the link target destination.

  161. Richard on June 2nd, 2009 5:29 pm

    works fine, thanks !

  162. Jay on June 6th, 2009 12:05 am

    Many thanks for this brilliant lightweight Lightbox – works great so far as i’m just displaying text…will try images and flash at some point.

    FOR those of you having PROBLEMS with:

    (1) Black overlay not covering the entire screen when on scroll/large pages

    AND

    (2) White box not being centered on scroll/large pages

    SOLUTION:
    set css black_overlay & white_content position: fixed; rather than position: absolute;

  163. Jay on June 8th, 2009 7:18 pm

    @SARAH, number 158

    Sarah the lightbox shows in the ‘white content’ everything within div id=’light’ and the relating javascript code, document.getElementById(’light’).

    Therefore if you want different things to show up in the lightbox then you will have to give them a different ID, e.g. div id=’light2 & document.getElementById(’light2′), div id=’light3 & document.getElementById(’light3′) and so on.

    I’m sure someone here can do something with functions to simplify this? – here i have two examples, calling FADE as it is constant for the opacity effect:

    **JS**


    function showLightbox()
    {
    document.getElementById(’light1′).style.display=’block’;
    document.getElementById(’fade’).style.display=’block’;
    }

    function closeLightbox()
    {
    document.getElementById(’light1′).style.display=’none’;
    document.getElementById(’fade’).style.display=’none’;
    }
    function showFade()
    {
    document.getElementById(’fade’).style.display=’block’;
    }
    function clearFade()
    {
    document.getElementById(’fade’).style.display=’none’;
    }

    **HTML**
    Link 1

        

    hope that helps.

  164. Jay on June 8th, 2009 7:21 pm

    sry html code doesn’t fully show…

    **HTML**
    a href=”javascript:void(0)” onclick = “showLightbox()”>Link 1

    input type=”button” name=”NoDontAgree” value=”No, I Disagree” width=”20″ onclick=”closeLightbox()”

    /div
    ///lightbox end

  165. Honey on June 11th, 2009 9:08 am

    Thank you very much…

    Few people wrote that the Title is a mistake becuase its not only CSS..

    but..I came here becuase I read it!..
    and It’s working perfect!..

    Be grateful..all the time!..This person is shareing with us. (oh too confortable find all the info easy!without mistakes..Its not ok!…Try to do the best too!)
    :)

    Im very graeatful!..

  166. Rob on June 16th, 2009 6:34 pm

    100% that’s javascript.

  167. stk on June 18th, 2009 3:58 am

    Fails if javascript is off. Not only does it fail, but it doesn’t even degrade.

    “No JavaScript Needed” – Bullshit.

  168. Samia on June 18th, 2009 6:38 pm

    Hey,this is a great code and quite simple for beginners like me, but it’s not working with apdivs’.Can you do something about it?It’s getting on my nerves.

  169. SMB on June 24th, 2009 11:57 pm

    BEAUTIFUL! It works beautifully! Just made the suggested change from “absolute” position to “fixed” to keep the content in place on large scrolling windows. Awesome! Works on Safari and Firefox for mac.

Leave a Reply




Trackbacks

  1. Universe_JDJ’s Blog » Screw Javascript - Use CSS to create a lightbox effect on August 23rd, 2007 11:42 am

    [...] read more | digg story [...]

  2. Use CSS to create a lightbox effect on August 24th, 2007 3:29 am

    [...] read more | digg story [...]

  3. Screw Javascript - Use CSS to create a lightbox effect « v1ruz blog on August 24th, 2007 8:44 am

    [...] read more | digg story Posted by v1ruz Filed in Uncategorized [...]

  4. Lightbox con 10% JavaScript y 90% CSS on August 24th, 2007 9:57 am

    [...] Así es, Emanuele Feronato ha decidido hacer un lightbox realmente ligero, ni siquiera necesita cargar un javascript externo, el lightbox se abre y se cierra directamente desde ordenes tipo onClick en los propios enlaces. [...]

  5. links for 2007-08-24 « squarechick on August 24th, 2007 2:59 pm

    [...] Create a Lightbox effect only with CSS – no javascript needed at Emanuele Feronato (tags: css lightbox webdesign) [...]

  6. » Consigue el efecto ThickBox o LightBox con CSS | Solo Código | on August 24th, 2007 3:00 pm

    [...] ThickBox y LightBox son 2 herramientas programadas en Javascript bastante elegantes a la hora de mostrar fotografías. Pero si no quieres utilizar Javascript, siemore puedes utilizar una alternativa hecha sólo con CSS, como la que ofrecen en Emanueleferonato, en la que tienes explicado todo el código y todos los pasos necesarios para crear el efecto. [...]

  7. Fatih HayrioÄŸlu’nun not defteri » 24 AÄŸustos 2007 Web’den Seçme Haberler on August 24th, 2007 3:26 pm

    [...] Sadece CSS ile lightbox yapımını anlatan bir makale. Link [...]

  8. Prime News Blog » Blog Archive » wonder woman drawings sketches Screw Javascript - Use CSS to create a lightbox effect on August 24th, 2007 3:40 pm

    [...] wonder woman drawings sketches You may call it Lightbox, or Greybox, or Thickbox, but it’s always the same effect. When you are on a page, and click on a photo or trig some event, a Lightbox is an effect that fades the pagein the background to show you new content in the foreground. hot wonder womanread more | digg story [...]

  9. creative component » Blog Archive » Lightbox JS with no JS, just CSS, OK? on August 24th, 2007 4:10 pm
  10. Screw Javascript - Use CSS to create a lightbox effect - News Doggy - Fetched News on August 24th, 2007 6:06 pm

    [...] You may call it Lightbox, or Greybox, or Thickbox, but it’s always the same effect. When you are on a page, and click on a photo or trig some event, a Lightbox is an effect that fades the pagein the background to show you new content in the foreground.read more | digg story [...]

  11. Jorge Yau » links for 2007-08-24 - Diseñador Web on August 24th, 2007 6:11 pm

    [...] Create a Lightbox effect only with CSS – no javascript needed at Emanuele Feronato (tags: css lightbox webdesign design tutorial web html howto) « The Gang [...]

  12. Cartoons Plugin » Blog Archive » final fantasy fan sites Screw Javascript - Use CSS to create a lightbox effect on August 24th, 2007 6:37 pm

    [...] final fantasy fan sites You may call it Lightbox, or Greybox, or Thickbox, but it’s always the same effect. When you are on a page, and click on a photo or trig some event, a Lightbox is an effect that fades the pagein the background to show you new content in the foreground. final fantasy gayread more | digg story [...]

  13. A Few Great Tutorials on August 24th, 2007 9:04 pm

    [...] Create a Lightbox effect with CSS, without using any JavaScript! This is one tutorial I am definitely going to try out, because I don’t like to use JavaScript for all those neat effects that are becoming more and more common on websites.Read this tutorial to create a Lightbox effect with CSS. [...]

  14. links for 2007-08-24 : Christopher Schmitt on August 24th, 2007 10:20 pm

    [...] Create a Lightbox Effect Only with CSS It’s a nice effect, but today’s kids want the JavaScript-enhanced animation, too. (tags: css lightbox webdesign design web html tutorial) [...]

  15. Create a Lightbox effect only with CSS - no javascript needed « DayGum on August 24th, 2007 10:55 pm

    [...] >>>>Read more [...]

  16. links for 2007-08-24 « napyfab:blog on August 25th, 2007 1:23 am

    [...] Create a Lightbox effect only with CSS – no javascript needed at Emanuele Feronato (tags: css lightbox webdesign design tutorial web development ajax javascript web2.0) [...]

  17. links for 2007-08-24 at Jason P. DeFillippo on August 25th, 2007 6:02 am

    [...] Create a Lightbox effect only with CSS – no javascript needed (tags: css design lightbox) [...]

  18. How to create a Lightbox effect only with CSS - no javascript needed at fxCraft on August 25th, 2007 1:30 pm

    [...] Read more… [...]

  19. SigT on August 25th, 2007 6:39 pm

    Cómo crear un Lightbox con CSS y sin librerias Javascript

    Los efectos tipo Lightbox para mostrar imágenes o páginas de login pueden resultar muy útiles.

    Cuando se empezaron a utilizar de forma masiva hace cosa de medio año fueron usados de forma tan exagerada que hoy en día parece que hayan desaparecid…

  20. Marc Ashwell » Blog Archive » links for 2007-08-25 on August 25th, 2007 11:22 pm

    [...] Create a Lightbox effect only with CSS – no javascript needed at Emanuele Feronato (tags: css lightbox webdesign design html web tutorial) [...]

  21. Crear el efecto de lightbox solo con CSS | Infected-FX| tutoriales, recursos y referencias para desarroladores y diseñadores web on August 26th, 2007 8:38 am

    [...]   [...]

  22. davidMHe Web Site» Blog Archive » Crear El Efecto Lightbox Únicamente Con CSS on August 26th, 2007 2:27 pm

    [...] Visitar la web: Create a Lightbox effect only with CSS – no javascript needed Sindicar RSS 2.0 [...]

  23. Efecto Lightbox con CSS on August 26th, 2007 9:10 pm

    [...] Para implementar este efecto se suele usar un scritp de JavaScritp. Al ser tan pesada la librería este scritp, muchos dejaron de lado el efecto Lightbox ya que lo creían muy lento. Recientemente se ha publicado (sigt también habló sobre esto) otro modo de implementar un Lightbox, que intenta no basarse tanto en JavaScritp y si en hojas de estilo CSS. [...]

  24. BlogcuBlogu.com » CSS ile Lightbox Yapımı on August 27th, 2007 12:54 pm

    [...] Lightbox’ı ister sitesindeki haliyle kullanabilir, ister WordPress için eklenti haline getirilmiÅŸ ÅŸeklini kullabilir veya ÅŸurada anlatılmış css versiyonunundan yararlanabilirsiniz. [...]

  25. links for 2007-08-28 « Simply… A User on August 28th, 2007 2:35 am

    [...] Create a Lightbox effect only with CSS – no javascript needed at Emanuele Feronato (tags: css lightbox webdesign design html tutorial web howto **) [...]

  26. Web Design Resource List v3.0 | on August 28th, 2007 5:29 am

    [...] Create a lightbox effect with CSS – I’m not sure how this works, I haven’t had the time to try it yet. I challange you to make this work and show me an example before I get the time to get it working. [...]

  27. Webmaster-Fans on August 31st, 2007 2:08 pm

    [...] Lightbox’ı ister sitesindeki haliyle kullanabilir, ister WordPress için eklenti haline getirilmiş şeklini kullabilir veya şurada anlatılmış css versiyonunundan yararlanabilirsiniz. [...]

  28. Weblog » Some links on September 3rd, 2007 5:48 pm

    [...] Very useful post of Emanuele Feronato: Create a Lightbox effect only with CSS – no javascript needed [...]

  29. tech.twomadgeeks.com » Create A Lightbox Effect With CSS on September 8th, 2007 11:29 am

    [...] Link: Emanuele Feronato [...]

  30. Boozox » Imaset: edtor de imágenes para Wordpress (Beta1) on September 17th, 2007 5:09 am
  31. MAKE SITES .CC : SWFbox V1.0 on September 22nd, 2007 11:41 am

    [...] on the work done here I created a flash lightbox for the Dreamway website. I needed a lightbox to present flash files [...]

  32. Screw Javascript - Use CSS to create a lightbox effect « Design News on October 3rd, 2007 12:50 pm

    [...] read more | digg story [...]

  33. The Scott Report on October 6th, 2007 1:30 am

    [...] Lightbox with just CSS Expect to see this at TSR in some fashion soon. [...]

  34. Screw Javascript - Use CSS to create a lightbox effect | yoZi on October 19th, 2007 9:55 am

    [...] is an effect that fades the pagein the background to show you new content in the foreground.read more | digg [...]

  35. alonon[at]alonon[nokta]net » Blog Archive » CSS ile Lightbox Yapımı on October 21st, 2007 11:04 pm

    [...] haliyle kullanabilir, ister WordPress için eklenti haline getirilmiş şeklini kullabilir veya şurada anlatılmış css versiyonunundan [...]

  36. Cobolian » LightBoxJS, Ajax and co on November 21st, 2007 12:38 pm

    [...] plus ou moins riches en fonctionnalités : LightWindow Greybox Lightbox effect without Lightbox Lightbox FX en CSS (et un poil de js) Modalbox Thickbox 33 plugins à base de MooTools (très intéressant) et bien sur l’excellent [...]

  37. Joyweb /// Microidc.com » Blog Archive » 纯CSS Lightbox效果(无需JS) on December 6th, 2007 4:44 am

    [...] 英文原文地址:http://www.emanueleferonato.com/2007/08/22/create-a-lightbox-effect-only-with-css-no-javascript-need… (No Ratings Yet)  Loading [...]

  38. My site, how does it look - Page 3 - Surpass Web Hosting Forums on March 11th, 2008 2:17 am

    [...] Originally Posted by William Thanks, does look nice and interesting, but I plan to do everything myself. Then this may be of interest: Create a Lightbox effect only with CSS – no javascript needed : Emanuele Feronato – italian geek and… [...]

  39. cevherler[at]cevherler[nokta]net » Blog Archives » CSS ile Lightbox Yapımı on March 23rd, 2008 9:13 pm

    [...] haliyle kullanabilir, ister WordPress için eklenti haline getirilmiş şeklini kullabilir veya şurada anlatılmış css versiyonunundan [...]

  40. ちょっと便利なCSS Tips いろいろ | DesignWalker on April 11th, 2008 8:20 am

    [...] 11. Create a Lightbox effect only with CSS – no javascript needed [...]

  41. Scriptを使わないCSSエフェクト、Tipsいろいろ - DesignWalker on April 16th, 2008 8:07 am

    [...] Create a Lightbox effect only with CSS – no javascript needed [...]

  42. Effets en Css pur et Conseils ( sans javascript ) on April 25th, 2008 11:44 pm

    [...] Create a Lightbox effect only with CSS – no javascript needed [...]

  43. Pure CSS Effects and Tips (Does not use JavaScript) | DESIGNwalker max on April 30th, 2008 7:47 am

    [...] Create a Lightbox effect only with CSS – no javascript needed [...]

  44. Mustafa TürksavaÅŸ » Blog ArÅŸivi » Derleme #2 on May 11th, 2008 1:55 am

    [...] bir blog uygulaması # Css kullanılarak lightbox efekti oluÅŸturmak üzerine güzel bir yazı # Burcu DoÄŸan‘dan jQuery üzerine çok güzel bir videolu anlatım # Grafik kullanmadan css [...]

  45. Best Solution for Web :: Create a Lightbox effect only with CSS - no javascript needed :: July :: 2008 on July 12th, 2008 9:25 am

    [...] Ref. emanueleferonato.com [...]

  46. Matevž Na Spletu » Blog Archive » Lahek Lightbox on July 29th, 2008 2:00 am

    [...] Pri trenutnem projektu sem potreboval navaden lightbox efekt. Naletel sem na članek na sledeči strani, ki je super zadostil mojim osnovim potrebam: http://www.emanueleferonato.com/2007/08/22/create-a-lightbox-effect-only-with-css-no-javascript-need... [...]

  47. Crear el efecto de lightbox solo con CSS | Web Grafi 2.0 on August 24th, 2008 7:10 am

    [...] Via:Emanueleferonato [...]

  48. Efecto Lightbox en Bligoo con CSS on September 28th, 2008 11:01 pm

    [...] guia (no pude escribirlo directamente ya que se descomponia el codigo) claro basado en la del autor del efecto. visto en [...]

  49. Efecto Lightbox con CSS » unijimpe on October 23rd, 2008 8:17 am

    [...] técnica fue originalmente explicada en Create a Lightbox effect only with CSS – no javascript needed en donde se explica que este efecto de mostrar un div que sobreponga todo el html, se puede [...]

  50. Crear el efecto de lightbox solo con CSS - Monjes - Cultura libre on October 28th, 2008 4:40 pm

    [...] Crear el efecto de lightbox solo con CSS Navegando me encuentro con este tutorial, interesante para aquellos que no deseen utilizar javascript para crear el efecto de Ligthbox, pueden usar esta técnica utilizando únicamente CSS. DESCARGAR [...]

  51. Crear el efecto de lightbox solo con CSS - Servidores / Webmasters on November 7th, 2008 8:21 pm

    [...] javascript para crear el efecto de Ligthbox, pueden usar esta técnica utilizando únicamente CSS. DESCARGAR Visiten mis aportes [...]

  52. ดึงข้อมูลด้วย gridview แล้วคลิกลิงค์ เปิด popup พร้อมแสดงข้อมูล (popup ไม่ใช้ window.open แต่ใช้ CSS) « ช่วงนี้บ้า on November 26th, 2008 7:42 pm
  53. Joaquín Núñez» Blog Archive » The Lightbox Clones Matrix on January 27th, 2009 4:22 pm

    [...] Bastante cómoda si no encuentras un lightbox que se acomode a tus necesidades….. de seguro que aquí encuentras lo que necesitas. Yo aún no doy con lo que necesito así que me haré un mega-super-ultra-liviano lightbox con este css. [...]

  54. TreeHouse » HDS網站改造計畫 on March 18th, 2009 4:54 am

    [...] | Google Search Engine Ranking FactorsCSS(網站) CSS語法教學(網站) Moving Boxes(網站) Create a Lightbox effect only with CSS(網站) CSS | Smashing [...]

  55. Discover the “Cool” of CSS: 25 Advanced CSS Techniques | Desizn Tech on March 25th, 2009 5:46 pm

    [...] is another useful  technique that is using CSS and a little Javascript to create the lightbox [...]

  56. 克兰印象 » 25个高级CSS技巧教程 on April 8th, 2009 3:07 am

    [...] technique [...]

  57. 神奇的CSS-25个样本迷死你 | 鹏博客 on April 23rd, 2009 5:34 am

    [...] technique [...]

  58. Tagz | "Create a Lightbox effect only with CSS - no javascript needed at Emanuele Feronato" | Comments on May 16th, 2009 6:54 pm

    [...] [upmod] [downmod] Create a Lightbox effect only with CSS – no javascript needed at Emanuele Feronato (www.emanueleferonato.com) 2 points posted 1 year, 8 months ago by SixSixSix tags css imported [...]

  59. 10 astonishing CSS hacks and techniques on June 16th, 2009 3:59 pm

    [...] Source: Lightbox effect in pure CSS: No javascript needed! [...]

  60. 10??????CSS hack????? « SonicHtml???- PSD?HTML / XHTML,CSS / W3C?? / ?????? / WordPress?? / Joomla?? on June 18th, 2009 9:42 am

    [...] ???Lightbox effect in pure CSS: No javascript needed! [...]

  61. 10??????CSS hack???| CSS| ???? on June 19th, 2009 3:33 am

    [...] ??:?CSS?Lighbox??:??Javascript ? [...]

  62. Web Super Star » Blog Archive » Ajax Lightbox and Modal Dialog Solutions on June 19th, 2009 10:14 am

    [...] Creating Lightbox with CSS [...]

  63. 10??????CSS hack??? | ???????... on June 19th, 2009 3:11 pm

    [...] ??:?CSS?Lighbox??:??Javascript ? [...]

  64. Efecto Lightbox solo con CSS | Ayuda WordPress on June 22nd, 2009 12:03 am

    [...] Si te gusta el efecto Lightbox ese redimensionado de las imágenes sin salir de la página, debes saber que no es necesario usar Javascript, lo puedes conseguir solo con CSS. [...]

  65. SpotGeek.net » Ajax lightbox and modal dialog solutions on June 30th, 2009 12:30 am

    [...] Creating Lightbox with CSS [...]

Posts