...

View Full Version : offsetting something from the center



mat
09-25-2002, 02:15 AM
i have a .swf that i would like to place in a html page and align center but i also want to offset it slightly so that it's 40px towards the left side. i tried this


<style>

#swfContainer{
margin-left: -30px;
width: 710px;
}

</style>

</HEAD>

<BODY bgcolor="#333333" >

<div align="center" id="#swfContainer">

<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
WIDTH="710" HEIGHT="433" id="index" ALIGN="">
<PARAM NAME=movie VALUE="index.swf"> <PARAM NAME=menu VALUE=false> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#333333> <EMBED src="index.swf" menu=false quality=high bgcolor=#333333 WIDTH="710" HEIGHT="433" NAME="index" ALIGN=""
TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
</OBJECT>

</div>




not much luck though. :confused:

adios
09-25-2002, 03:48 AM
Close.

<div align="center" id="#swfContainer">

The hash goes with the selector (in the stylesheet) - like a dot signifying CLASS, it means ID. Illegal character in the ID itself.

Negative margins are iffy. Try this:

#swfContainer {
width: 100%;
text-align: center;
margin-right: 40px;
}

You can lose the align="center"; redundant in this case (unless you want non-CSS backup).

:)

mat
09-25-2002, 04:26 AM
Thanks, :)


Negative margins are iffy

old browsers? nutscape?

adios
09-25-2002, 04:36 AM
Mostly v.4s.

http://hotwired.lycos.com/webmonkey/98/15/index2a_page5.html?tw=authoring



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum