Topic: Gallery will not Align Center- Code different from other topics

I've search the topics here but my code is different from all the other topics- They all have an embed code, but my gallery html page doesn't have that.  This is the page generated by SV, and I added a header JPG with hotlinks in Dreamweaver. I have tried resizing the gallery, center tags, aligning in various places, margins in different places... I just can't figure out why the gallery won't center.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title> Editorial Photography</title>

<META name="keywords" content="photography, los angeles,"> 
        
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
        <script type="text/javascript">
            var flashvars = {};
            flashvars.galleryURL = "gallery.xml";
            //flashvars.firstImageIndex = "0";
            //flashvars.preloaderColor = "#FFFFFF";
            var params = {};
            params.allowfullscreen = true;
            params.allowscriptaccess = "always";
            params.bgcolor = "000000";
            swfobject.embedSWF("simpleviewer.swf", "flashContent", "100%", "100%", "9.0.124", false, flashvars, params);
        </script>

        <style type="text/css" media="screen">
            html, body    { height:100%; }
            body {
                margin:0;
                padding:0;
                overflow:auto;
                background-color: #000000;
                color:#666;
                font-family:sans-serif;
                font-size:20px;
            }
            a {
                color:#ff0000;
            }
        .style1 {font-family: "Courier New", Courier, monospace;
font-size: 12px;}
.style2 {    color: #CCCCCC;
    font-family: "Courier New", Courier, monospace;
}
        </style>
    </head><body>
  <table width="200" border="0" align="center" dwcopytype="CopyTableRow">
        <tr>
          <td>&nbsp;</td>
          <td><div align="center">
            <p><img src="../SHPhotoLab_Banner2012.jpg" alt="" width="1047" height="128" border="0" align="middle" usemap="#Map" /></p>
            <p class="style2"><span class="style1">all images &copy; s.h. photo 2009-2012</span> </p>
            </div></td>
          <td>&nbsp;</td>
        </tr>
      </table>
      <map name="Map" id="Map">
        <area shape="rect" coords="282,8,385,118" href="...documentary/documentary.html" alt="Documentary" />
        <area shape="rect" coords="409,7,511,115" href="http://www.shphotolab.com/assignment/assignment.html" alt="On Assignment" />
        <area shape="rect" coords="534,4,640,116" href="...people/people.html" alt="People" />
        <area shape="rect" coords="666,7,768,118" href="...personal/personal.html" alt="Personal Work" />
        <area shape="rect" coords="795,7,898,117" href="...editorial/editorial.html" alt="Editorial" />
        <area shape="rect" coords="929,6,1035,119" href="...performance/performance.html" alt="Live Performance" />
      </map>
    <p>&nbsp;</p>
      <div align="center"></div><div id="flashContent">
        SimpleViewer requires JavaScript and the Flash Player. <a href="http://www.adobe.com/go/getflashplayer/">Get Flash.</a>.</p>
      </body>
</html>

What am I missing?

Re: Gallery will not Align Center- Code different from other topics

Try changing the following code in your page:

<div align="center"></div><div id="flashContent">
        SimpleViewer requires JavaScript and the Flash Player. <a href="http://www.adobe.com/go/getflashplayer/">Get Flash.</a>.</p>

... to:

<div id="flashContent" style="margin: 0 auto;">
        SimpleViewer requires JavaScript and the Flash Player. <a href="http://www.adobe.com/go/getflashplayer/">Get Flash.</a>.</div>
Steven Speirs
SimpleViewer Support Team.

Re: Gallery will not Align Center- Code different from other topics

I saw that in another post, and tried it but it didn't seem to work. I will try it again I guess.

Re: Gallery will not Align Center- Code different from other topics

ok I've figured out this is a resizing issue- when the screen is much wider the gallery centers, but when the browser window is the full size of my laptop monitor, it's still left-aligned.

I figured changing the percentages here

swfobject.embedSWF("simpleviewer.swf", "flashContent", "100%", "100%", "9.0.124", false, flashvars, params);

would resize the gallery and allow for that extra room, but that's not working either.

Is this a problem with the size of my gallery build? Should I rebuild the galleries with a smaller display?

(also, a side bar, what is the "9.0.124" for?)

Re: Gallery will not Align Center- Code different from other topics

Try the following:

<div id="container" style="width: 100%; height: 100%; margin: 0 auto;">
    <div id="flashContent"></div>
</div>

... giving the 'container' <div> the same dimensions as your gallery (as set in the 'swfobject.embedSWF' line).

what is the "9.0.124" for?

Quote from the swfobject documentation:

version (String, required) specifies the Flash player version your SWF is published for (format is: "major.minor.release" or "major")

ie, it is the minimum required Adobe Flash Player version number which is checked for.

Steven Speirs
SimpleViewer Support Team.