Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IE display and .swf overhang

Status
Not open for further replies.

schonkton

Technical User
Apr 2, 2007
5
GB
hello,

can anybody help me please?

how do i get this .swf to display properly in IE, it works fine in safari and firefox. the idea is to center it with the edges hanging off the page.

many thanks.

<style type="text/css">
<!--
.newsflash {
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
}
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-repeat: repeat-y;
background-position: center 300px ;
background-image: url(templates/redonwhite/images/rpt_bg.jpg);
}
.Stil2 {color: #000000}
.Stil3 {color: #FFFFFF}

-->
</style>
</head>
<body>

<div style="text-align:center">

<div style="margin:0 auto; overflow:hidden; width:680px; position: relative; left:-460px">
<!-- begin embedded Flash file... -->
<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'
codebase=' width="1600" height="300">
<param name='movie' value=" <param name='quality' value="high">
<param name='bgcolor' value='#FFFFFF'>
<param name='loop' value="false">
<EMBED src=" quality='high' bgcolor='#FFFFFF' width="1600"
height="300" loop="false" type='application/x-shockwave-flash'
pluginspage=' </EMBED>
</OBJECT>

<!-- ...end embedded Flash file -->


</div>


<div style="text-align:left; width: 680px;margin:0 auto">

<!-- <table border="1">
<tr>
<td valign="top" align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">table1 <br />
<br />
<?php mosLoadModules ( 'user5', -1 ); ?>
</font></td>
<td>&nbsp;</td>
</tr>
</table> -->

<!-- <table class="newsflash" border="1" cellspacing="0" cellpadding="0" align="center">
<tr>
<td>table2 <div id="newsflash" class="newsflash">
<?php mosLoadModules ( 'top' ); ?>
</div></td>

</tr>
</table> -->

<table width="670" border="0px" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" width="130px"><?php mosLoadModules ( 'left' ); ?> </td>
<td align="center" valign="top" width="15px" style="background: url(templates/redonwhite/images/dot2.gif)"> </td>
<td align="left" valign="top" width="535px"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong><?php mosPathWay(); ?> </strong></font> <br />
<?php include ("mainbody.php"); ?></td>
</tr>
</table>

<!-- <table border="1">
<tr>
<td valign="top">table4<div align="center"><span class="copyright Stil3"><font face="Arial, Helvetica, sans-serif"><font face="Arial, Helvetica, sans-serif">&copy; </font><?php echo $mosConfig_sitename; ?> 2007</font></span></div></td>
</tr>
</table> -->

</div>
 
I don't know exactly what you mean by the overhang, but I got your page looking the same in FF and IE changing the following:

Change this:
Code:
<div style="margin:0 auto; overflow:hidden; width:680px; position: relative; left:-460px">


To this:

Code:
<div style="margin:0px auto; overflow:hidden">

This assumes you have a valid docType.

[monkey][snake] <.
 
hello,

thanks for your interest.

that works fine when browser window is maximised but i want to center the .swf in the window no matter what size it is. in effect pushing it off either side (this is what i mean by overhang). can you help?

thanks again.
 
Here's a poor example of what you are after:

Code:
 <div style="left:50%; margin-left:-800px; position:absolute">

I don't like absolute, but IE is buggy with position:relative on this.

[monkey][snake] <.
 
ok,
that seems to center my .swf (by the way, i know it's 1px out) but now the tables below are not visible. do i need to position them y or something? also, my repeating background now seems to be off. do i apply what you've just given me to this in some way?
 
Can you post the source code from your browser? I can't see exactly what you're talking about b/c of the php code.

[monkey][snake] <.
 
below is the source as i originally had it. as i say this seems to work in firefox and safari. i think the problem with IE might be the width:680px; position: relative; left:-460px" as IE displays a section of the flash. your positioning did center the header but then i had a nasty scroll bar. is there a way round this?

here is source as i originally had it:

Code:
<?xml version="1.0" encoding="iso-8859-1"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml">[/URL]
<head>
<title>Black Dog - Home</title>
<meta name="description" content="Black Dog Street Wear" />
<meta name="keywords" content="black, dog, emo, punk, rock, clothing, jeans, t-shirt, famous, atticus" />
<meta name="Generator" content="Joomla! - Copyright (C) 2005 - 2006 Open Source Matters. All rights reserved." />
<meta name="robots" content="index, follow" />
	<link rel="shortcut icon" href="[URL unfurl="true"]http://www.blackdogstreetwear.co.uk/images/favicon.ico"[/URL] />
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="alternate" title="Black Dog" href="[URL unfurl="true"]http://www.blackdogstreetwear.co.uk/index2.php?option=com_rss&no_html=1"[/URL] type="application/rss+xml" />
<link href="templates/redonwhite/css/template_css.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.newsflash {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
}
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-repeat: repeat-y;
	background-position: center 300px ;
	background-image: url(templates/redonwhite/images/rpt_bg.jpg);
}
.Stil2 {color: #000000}
.Stil3 {color: #FFFFFF}
	
-->
</style>
</head>
<body>
<div style="text-align:center">
<div style="margin:0 auto; overflow:hidden; width:680px; position: relative; left:-460px">
<!-- begin embedded Flash file... -->        
<!--[if gte IE 6]><script language="javascript">document.write("<NOSCRIPT class=clickfix><OBJECT style=\"display:none\">"); </script> <[endif]-->
<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'
        codebase='[URL unfurl="true"]http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0'[/URL]
        width="1600" height="300">
        <param name='movie' value="[URL unfurl="true"]http://blackdogstreetwear.co.uk/templates/redonwhite/images/bd_header280307_2.swf"/>[/URL]
        </object>
        </object>
<!--[if gte IE 6]></OBJECT></NOSCRIPT><!--<![endif]-->
<!-- ...end embedded Flash file -->
</div>
<div style="text-align:left; width: 680px;margin:0 auto">
 
 <!-- <table border="1"> 
    <tr> 
      <td valign="top" align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">table1 <br /> 
          <br /> 
           
          </font></td> 
      <td>&nbsp;</td> 
    </tr> 
  </table> -->
  
  <!--  <table class="newsflash" border="1" cellspacing="0" cellpadding="0" align="center"> 
    <tr> 
      <td>table2 <div id="newsflash" class="newsflash"> 
          		<table cellpadding="0" cellspacing="0" class="moduletable">
					<tr>
				<th valign="top">
					Newsflash				</th>
			</tr>
					<tr>
			<td>
				
		<table class="contentpaneopen">
				<tr>
			<td valign="top" colspan="2">
				&nbsp;what shocking news at the gig			</td>
		</tr>
				</table>

		<span class="article_seperator">&nbsp;</span>

					</td>
		</tr>
		</table>
		 
        </div></td>
		 
    </tr> 
  </table> -->
   
  <table width="670" border="0px" cellspacing="0" cellpadding="0"> 
    <tr> 
      <td valign="top" width="130px">		<table cellpadding="0" cellspacing="0" class="moduletable">
					<tr>
				<th valign="top">
					Main Menu				</th>
			</tr>
					<tr>
			<td>
				
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr align="left"><td><a href="[URL unfurl="true"]http://www.blackdogstreetwear.co.uk/index.php?option=com_frontpage&amp;Itemid=1"[/URL] class="mainlevel" id="active_menu">Home</a></td></tr>
<tr align="left"><td><a href="[URL unfurl="true"]http://www.blackdogstreetwear.co.uk/index.php?option=com_content&amp;task=section&amp;id=1&amp;Itemid=2"[/URL] class="mainlevel" >News</a></td></tr>
<tr align="left"><td><a href="[URL unfurl="true"]http://www.blackdogstreetwear.co.uk/index.php?option=com_joomlaboard&amp;Itemid=26"[/URL] class="mainlevel" >Forum</a></td></tr>
<tr align="left"><td><a href="[URL unfurl="true"]http://www.blackdogstreetwear.co.uk/index.php?option=com_contact&amp;Itemid=3"[/URL] class="mainlevel" >Contact Us</a></td></tr>
<tr align="left"><td><a href="[URL unfurl="true"]http://www.blackdogstreetwear.co.uk/index.php?option=com_content&amp;task=blogcategory&amp;id=13&amp;Itemid=28"[/URL] class="mainlevel" >Music</a></td></tr>
<tr align="left"><td><a href="[URL unfurl="true"]http://www.blackdogstreetwear.co.uk/index.php?option=com_content&amp;task=view&amp;id=5&amp;Itemid=6"[/URL] class="mainlevel" >Shop</a></td></tr>
<tr align="left"><td><a href="[URL unfurl="true"]http://www.blackdogstreetwear.co.uk/index.php?option=com_weblinks&amp;Itemid=23"[/URL] class="mainlevel" >Links</a></td></tr>
<tr align="left"><td><a href="[URL unfurl="true"]http://www.blackdogstreetwear.co.uk/index.php?option=com_search&amp;Itemid=5"[/URL] class="mainlevel" >Search</a></td></tr>
</table>			</td>
		</tr>
		</table>
				<table cellpadding="0" cellspacing="0" class="moduletable">
				<tr>
			<td>
							</td>
		</tr>
		</table>
				<table cellpadding="0" cellspacing="0" class="moduletable">
					<tr>
				<th valign="top">
					Login Form				</th>
			</tr>
					<tr>
			<td>
				 	<form action="[URL unfurl="true"]http://www.blackdogstreetwear.co.uk/index.php"[/URL] method="post" name="login" >
		
	<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
	<tr>
		<td>
			<label for="mod_login_username">
				Username			</label>
			<br />
			<input name="username" id="mod_login_username" type="text" class="inputbox" alt="username" size="10" />
			<br />
			<label for="mod_login_password">
				Password			</label>
			<br />
			<input type="password" id="mod_login_password" name="passwd" class="inputbox" size="10" alt="password" />
			<br />
			<input type="checkbox" name="remember" id="mod_login_remember" class="inputbox" value="yes" alt="Remember Me" />
			<label for="mod_login_remember">
				Remember me			</label>
						<br />
			<input type="submit" name="Submit" class="button" value="Login" />
		</td>
	</tr>
	<tr>
		<td>
			<a href="[URL unfurl="true"]http://www.blackdogstreetwear.co.uk/index.php?option=com_registration&amp;task=lostPassword">[/URL]
				Lost Password?</a>
		</td>
	</tr>
			<tr>
			<td>
				No account yet?				<a href="[URL unfurl="true"]http://www.blackdogstreetwear.co.uk/index.php?option=com_registration&amp;task=register">[/URL]
					Register</a>
			</td>
		</tr>
			</table>
	
	<input type="hidden" name="option" value="login" />
	<input type="hidden" name="op2" value="login" />
	<input type="hidden" name="lang" value="english" />
	<input type="hidden" name="return" value="[URL unfurl="true"]http://blackdogstreetwear.co.uk/"[/URL] />
	<input type="hidden" name="message" value="0" />
	<input type="hidden" name="jc0151c7ba9c4cb401b6c9d7c813f4d4c" value="1" />
	</form>
				</td>
		</tr>
		</table>
				<table cellpadding="0" cellspacing="0" class="moduletable">
					<tr>
				<th valign="top">
					Syndicate				</th>
			</tr>
					<tr>
			<td>
				<div class="syndicate">
			<div align="center">
			<a href="[URL unfurl="true"]http://www.blackdogstreetwear.co.uk/index.php?option=com_rss&amp;feed=RSS0.91&amp;no_html=1">[/URL]
				<img src="[URL unfurl="true"]http://www.blackdogstreetwear.co.uk/images/M_images/rss091.gif"[/URL]  alt="RSS 0.91" name="RSS091" align="middle" border="0" /></a>
		</div>
				<div align="center">
			<a href="[URL unfurl="true"]http://www.blackdogstreetwear.co.uk/index.php?option=com_rss&amp;feed=RSS1.0&amp;no_html=1">[/URL]
				<img src="[URL unfurl="true"]http://www.blackdogstreetwear.co.uk/images/M_images/rss10.gif"[/URL]  alt="RSS 1.0" name="RSS10" align="middle" border="0" /></a>
		</div>
				<div align="center">
			<a href="[URL unfurl="true"]http://www.blackdogstreetwear.co.uk/index.php?option=com_rss&amp;feed=RSS2.0&amp;no_html=1">[/URL]
				<img src="[URL unfurl="true"]http://www.blackdogstreetwear.co.uk/images/M_images/rss20.gif"[/URL]  alt="RSS 2.0" name="RSS20" align="middle" border="0" /></a>
		</div>
				<div align="center">
			<a href="[URL unfurl="true"]http://www.blackdogstreetwear.co.uk/index.php?option=com_rss&amp;feed=ATOM0.3&amp;no_html=1">[/URL]
				<img src="[URL unfurl="true"]http://www.blackdogstreetwear.co.uk/images/M_images/atom03.gif"[/URL]  alt="ATOM 0.3" name="ATOM03" align="middle" border="0" /></a>
		</div>
				<div align="center">
			<a href="[URL unfurl="true"]http://www.blackdogstreetwear.co.uk/index.php?option=com_rss&amp;feed=OPML&amp;no_html=1">[/URL]
				<img src="[URL unfurl="true"]http://www.blackdogstreetwear.co.uk/images/M_images/opml.png"[/URL]  alt="OPML" name="OPML" align="middle" border="0" /></a>
		</div>
		</div>			</td>
		</tr>
		</table>
		 </td> 
      <td align="center" valign="top" width="15px" style="background: url(templates/redonwhite/images/dot2.gif)"> </td>
	  <td align="left" valign="top" width="535px"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong><span class="pathway">Home </span> </strong></font> <br />
<table class="blog" cellpadding="0" cellspacing="0"><tr><td valign="top"><div>				<table class="contentpaneopen">
			<tr>
								<td class="contentheading" width="100%">
					Welcome to Black Dog									</td>
							</tr>
			</table>
			
		<table class="contentpaneopen">
				<tr>
			<td valign="top" colspan="2">
				This is your introduction<div><br /></div><div><br /></div><div>d</div><div>d</div>			</td>
		</tr>
						<tr>
					<td align="left" colspan="2">
						<a href="[URL unfurl="true"]http://www.blackdogstreetwear.co.uk/index.php?option=com_content&amp;task=view&amp;id=1&amp;Itemid=1"[/URL] class="readon">
							Read more...</a>
					</td>
				</tr>
						</table>

		<span class="article_seperator">&nbsp;</span>

		</div></td></tr><tr><td valign="top"><table width="100%"  cellpadding="0" cellspacing="0"><tr><td valign="top" width="50%">			<table class="contentpaneopen">
			<tr>
								<td class="contentheading" width="100%">
					Gig News									</td>
							</tr>
			</table>
			
		<table class="contentpaneopen">
				<tr>
			<td valign="top" colspan="2">
				&nbsp;what shocking news at the gig			</td>
		</tr>
				</table>

		<span class="article_seperator">&nbsp;</span>

		</td><td valign="top" width="50%">			<table class="contentpaneopen">
			<tr>
								<td class="contentheading" width="100%">
					New Atticus									</td>
							</tr>
			</table>
			
		<table class="contentpaneopen">
				<tr>
			<td valign="top" colspan="2">
				&nbsp;Oh my god! brand new aaticus in stock.			</td>
		</tr>
				</table>

		<span class="article_seperator">&nbsp;</span>

		</td></tr></table></td></tr><tr><td valign="top"><div class="blog_more">			<div>
				<strong>
				More...				</strong>
			</div>
					<ul>
					<li>
				<a class="blogsection" href="[URL unfurl="true"]http://www.blackdogstreetwear.co.uk/index.php?option=com_content&amp;task=view&amp;id=4&amp;Itemid=1">[/URL]
					Newsflash 3</a>
			</li>
					</ul>
		</div></td></tr></table></td> 
    </tr> 
   </table>
		
<!-- <table border="1">
<tr>
  <td valign="top">table4<div align="center"><span class="copyright Stil3"><font face="Arial, Helvetica, sans-serif"><font face="Arial, Helvetica, sans-serif">&copy; </font>Black Dog 2007</font></span></div></td> 
  </tr> 
  </table> -->
  
   </div>
  <span class="copyright Stil2"><font face="Arial, Helvetica, sans-serif"><a href="[URL unfurl="true"]http://validator.w3.org/check/referer"[/URL] title="This page validates as XHTML 1.0 Transitional">Valid <abbr title="eXtensible HyperText Markup Language">XHTML</abbr></a></font></span>
  </div> 

<script language="JScript" type="text/jscript" src="/templates/redonwhite/ClickFix.js"></script>
</body>
</html>
 
The scrollbar was created because by default without specifying width, your flash object is 1600px wide, which is wider than our screens.

[monkey][snake] <.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top