Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



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

Posts: 4
Trades: 0
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
 
 
Register now for full access!
Old 06-01-2008, 08:15 PM Re: lightbox2 problem - css conflict?
vn5ltr's Avatar
Skilled Talker

Posts: 93
Location: Melbourne, Australia
Trades: 0
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, 08:29 PM Re: lightbox2 problem - css conflict?
Junior Talker

Posts: 4
Trades: 0
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 08:33 PM.. Reason: edit
archas is offline
Reply With Quote
View Public Profile
 
Old 06-01-2008, 08:39 PM Re: lightbox2 problem - css conflict?
vn5ltr's Avatar
Skilled Talker

Posts: 93
Location: Melbourne, Australia
Trades: 0
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, 09:22 PM Re: lightbox2 problem - css conflict?
Junior Talker

Posts: 4
Trades: 0
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 09:25 PM..
archas is offline
Reply With Quote
View Public Profile
 
Old 06-01-2008, 09:30 PM Re: lightbox2 problem - css conflict?
vn5ltr's Avatar
Skilled Talker

Posts: 93
Location: Melbourne, Australia
Trades: 0
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, 10:54 AM Re: lightbox2 problem - css conflict?
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
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 !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to lightbox2 problem - css conflict?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB 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.59158 seconds with 12 queries