PDA

View Full Version : Custom lightbox issues


Jake2641
07-24-2009, 01:49 AM
I made a custom lightbox so when you click a link the page dims out and a box appears (much like newgrounds) but for some damn reason that I cannot explain, Internet Explorer is dumb and creates the div at the end of the page, no effects and if you keep clicking the link it makes more divs! Firefox works perfectly and I have no idea why this is happening.

At http://0life.org/pages/jstest.html it works fine in IE but when I transfer it over to my main site it stops working and acts dumb. I have tried everything, only stuff in the <script> tags and the one link are copied so I have no idea why things are getting messed up. The div is not being referenced in any stylesheets either.

The code can be found at 0life.org and the "View All Boards" link is the link that triggers the lightbox. Just rightclick and view source, its the only javascript on the website.

How do I solve this?

Jake2641
07-24-2009, 02:12 AM
Fixed it. IE will not let this work without a doctype.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

yell0wdart
07-24-2009, 02:15 AM
Sounds about right. It's not valid markup without a doctype. :)