Log in

View Full Version : centering problem with lightbox-esque script



moscarda
04-24-2009, 08:04 AM
i'm using multibox, to have a pop-up mp3 player in a lightbox kind of script. it is supposed to load centered in the screen. I have a long vertical scrolling page, so when the multibox pops up, it is in the literal center of the page, and i have to scroll down to see it.

I'm sure this is a simple css problem, but I'm not good with positioning. The page is here, click on any of the mp3 files to active multibox:

http://metrosonic.net/showcase-multibox.html

jscheuer1
04-24-2009, 04:24 PM
It actually works OK in Opera. In Firefox it works like you say. In IE 7 the player appears in the upper left corner.

The first thing I would try is using a strict HTML 4.01 DOCTYPE with URL:


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

I suggest this because I see your 'box' script uses mootools, and many of these libs (mootools included) require a standards compliant environment in order to get the dimensions they require for calculating positioning.

moscarda
04-26-2009, 05:40 PM
that works great, but it messes up the nav bar at the top. can you help me fix that? look at this page to see what i mean:

www.metrosonic.net/showcase-multibox2.html

X96 Web Design
04-26-2009, 05:54 PM
Remove all the <FONT> tags from the menu, then add this code to your CSS file:


#table1 tbody tr td a, #table1 tbody tr td a:hover, #table1 tbody tr td a:active, #table1 tbody tr td a:visited {
color:#fff;
text-decoration:none;
}

And where you have the dividing image, remove the BGCOLOR:


<td width="20" bgcolor="#336699">
<img width="20" height="20" border="0" src="images/ms_menu_left.gif"/>
</td>


And if you can - try to get away from tables and use a CSS menu!

Hope this helps,

// X96 WD \\