Reply
lightbox2 problem - css conflict?
Old 06-01-2008, 06:53 PM lightbox2 problem - css conflict?
Junior Talker

Posts: 4
open (in firefox) http://archweb.pl/test/www.php and click on the
image.
you can see what i mean...
in ie everything is ok.
wtf?
archas is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 06-01-2008, 07:15 PM Re: lightbox2 problem - css conflict?
vn5ltr's Avatar
Skilled Talker

Posts: 95
Location: Melbourne, Australia
Ummmmm....
Why is your container aligned with vertical-align and table-cell instead of:
margin: 0 auto;

The actual layout is screwed to begin with...
vn5ltr is offline
Reply With Quote
View Public Profile
 
Old 06-01-2008, 07:29 PM Re: lightbox2 problem - css conflict?
Junior Talker

Posts: 4
cuz i want to middle vertically my layout

edit:
without .css files of lightbox, there is everything ok. but i want to have lightbox2 on my site, so i put these lines into the code:
<link rel="stylesheet" href="style/lightbox.css" type="text/css" media="screen" />
<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/scriptaculous.js?load=effects,builder"></script>
<script type="text/javascript" src="js/lightbox.js"></script>

i click on the miniature of the photo and it crashes. i suppose that this is because of 'display: table' in body, html, but it is necessary for my vertically aligned layout (as i think it is..).

Last edited by archas : 06-01-2008 at 07:33 PM. Reason: edit
archas is offline
Reply With Quote
View Public Profile
 
Old 06-01-2008, 07:39 PM Re: lightbox2 problem - css conflict?
vn5ltr's Avatar
Skilled Talker

Posts: 95
Location: Melbourne, Australia
If you want to vertically align a div, do something like this:

HTML Code:
<style type="text/css">
div.container {
width:500px;
height:400px;
background-color:#000000;
margin-left:-250px; /* half of width */
margin-top:-200px; /* half of height */
top:50%;
left:50%;
position:absolute;
z-index:10;
}
</style>
Keep in mind that the height will need to be specified. Otherwise, if it is dynamic, you will need to adjust the height via the DOM in js based on the offsets of your view.
vn5ltr is offline
Reply With Quote
View Public Profile
 
Old 06-01-2008, 08:22 PM Re: lightbox2 problem - css conflict?
Junior Talker

Posts: 4
thanks vn5ltr for your advice.
but you know.. your advice is not so good for me, cuz i have a dynamic height of the container. nevermind.
as you can see, the layout is working in IE and in every browser as well. all i need is good, working solution how to center vertically the container but not using the 'table' in the 'html, body' (which crashes the lightbox).
i'll be glad if you give me that.

edit:
but now im going to sleep. its almost 2.30 am here, so good night everyone

Last edited by archas : 06-01-2008 at 08:25 PM.
archas is offline
Reply With Quote
View Public Profile
 
Old 06-01-2008, 08:30 PM Re: lightbox2 problem - css conflict?
vn5ltr's Avatar
Skilled Talker

Posts: 95
Location: Melbourne, Australia
Come to think of it, I don't understand how you expect to vertically align a container with a dynamic height?? It isn't logical unless what you 'see' are the boundaries of your container height, then you can vertically align it...

Why not just give the top a margin to offset is like every other site, then you can have your dynamic height?
vn5ltr is offline
Reply With Quote
View Public Profile
 
Old 06-02-2008, 09:54 AM Re: lightbox2 problem - css conflict?
LadynRed's Avatar
Super Moderator

Posts: 6,553
Location: Tennessee
There are several vertical centering methods in this stickie:
http://www.webmaster-talk.com/css-fo...r-website.html
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to lightbox2 problem - css conflict?
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.14929 seconds with 12 queries