Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
February 07, 2012, 12:28:48 AM

Pages: [1]   Go Down
  Print  
Author Topic: How can I center this?  (Read 388 times)
Shilohhawk
Trekkie
**
Offline Offline

Posts: 13


« on: June 19, 2009, 01:37:34 PM »

I am working on a page and I can't seem to get the slide show to center. Any ideas?

http://midwestserpents.com/csst.html

Please be specific I am not very good with html.

thanks
Shiloh
Logged
MrPhil
Berserker Poster
*****
Offline Offline

Posts: 5079



« Reply #1 on: June 21, 2009, 01:15:06 PM »

Look for whatever code or CSS file sets the parameters for "canvas0" and "canvas1". I see that they are position: absolute with left: 0, which should place them hard left within their parent, which appears to be an anonymous <div> of the same size as the two canvases. Its positioning is "relative" to its natural position, but there are no offsets. If I understand it, that should leave your two canvases at the left edge of the screen. The first thing I'd try is changing
Code:
document.write('<div style="position:relative;width:'+trans_width+';height:'+trans_height+';overflow:hidden">
to
Code:
document.write('<div style="position:absolute; left:0; margin-left: auto; margin-right: auto; width:'+trans_width+';height:'+trans_height+';overflow:hidden">

See if matters improve at all.
Logged

Shilohhawk
Trekkie
**
Offline Offline

Posts: 13


« Reply #2 on: June 22, 2009, 05:29:23 AM »

That does not seem to make an improvement.

The page went from this: http://midwestserpents.com/csst.html

To this: http://midwestserpents.com/csst1.html


If you notice between the two, the first link is a bit further right, the second link is right on the edge of the green.

Any ideas?

thanks
Shiloh
Logged
Shilohhawk
Trekkie
**
Offline Offline

Posts: 13


« Reply #3 on: June 22, 2009, 05:47:28 AM »

Got it...

I added <DIV ALIGN=CENTER> before <div style="position:relative;width:'+trans_width+';height:'+trans_height+';overflow:hidden">
Logged
Pages: [1]   Go Up
  Print  
 
Jump to: