PDA

View Full Version : Center Flash Menu at Bottom of Page


dbstudios
06-02-2006, 06:10 PM
Hello everybody,

On my website, www.dillonbrown.com, I have been trying to place a Flash menu at the bottom of the page, always at the bottom of the page, in any browser like I have done on www.liquidbeancoffee.com/demo. I have successfully placed it at the bottom of the page but I cannot get it to be centered exactly in the center of the page. It's either off to the right, I can place it to the right or to the left using right:0; or left:0; but I cannot get it to be centered. Here's the code I'm using, which you can also see by viewing the source of the page on my website. I had to use two seperate blocks of code to get this to work - one for Firefox, which supports position:fixed, and one for Internet Explorer, which I think is a hack to make it work.

For Firefox:

#menu {
position:fixed;
bottom:0;
right: 0;
}

For Internet Explorer:
<!--[if lte IE 6]>
<style type="text/css">

#menu {
position:absolute;
}
</style>
<![endif]-->

The Flash Object Code:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="340" height="25" id="menu">
<param name="movie" value="menu.swf">
<param name=quality value=high>
<embed src="menu.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="340" height="25"></embed>
</object>

Also, for some reason when I try to view the page in Internet Explorer the menu doesn't automatically show up, instead giving the message that "To help protect your security, Internet Explorer has restricted this file from showing active content that could access your computer. Click for options..." Is there any way to get around this because I definitely don't want users running IE to come to my site and have that come up. Any help would be greatly appreciated. Thank you!

_Aerospace_Eng_
06-02-2006, 07:37 PM
That warning will only occur in IE locally. It will go away when the page is on the server. Try it like this
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>dillon brown studios</title>
<base href="http://www.dillonbrown.com/"><!--used for testing purposes-->
<style type="text/css">
html, body {
margin:0;
padding:0;
height:100%;
background:#000;
color:#FFF;
overflow:auto;
}
a img {
border:0;
}
#container {
width:360px;
text-align:center;
min-height:100%;
position:relative;
margin:auto;
}
* html #container {
height:100%;
}
#container img {
display:block;
margin:auto;
}
#imghold {
height:397px;
position:absolute;
top:50%;
margin-top:-198.5px;
left:0;
width:360px;
}
#nav {
position:absolute;
bottom:0;
left:50%;
margin-left:-170px;
}
</style>
</head>

<body>
<div id="container">
<div id="imghold">
<img src="dbslogo.jpg" width="360" height="360" alt="">
<a href="http://www.hoboker.com"><img src="hoboker.jpg" width="178" height="37" alt=""></a>
</div>
<div id="nav">
<object type="application/x-shockwave-flash" data="menu.swf" width="340" height="25">
<param name="movie" value="menu.swf">
<param name="bgcolor" value="000000">
</object>
</div>
</div>
</body>
</html>

dbstudios
06-02-2006, 07:52 PM
Thank you _Aerospace_Eng_!