Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    mat
    mat is offline
    Regular Coder
    Join Date
    Jul 2002
    Posts
    199
    Thanks
    0
    Thanked 0 Times in 0 Posts

    offsetting something from the center

    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="clsid27CDB6E-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.

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Posts
    1,404
    Thanks
    2
    Thanked 32 Times in 32 Posts
    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).

    Last edited by adios; 09-25-2002 at 03:50 AM.

  • #3
    mat
    mat is offline
    Regular Coder
    Join Date
    Jul 2002
    Posts
    199
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks,

    Negative margins are iffy
    old browsers? nutscape?

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Posts
    1,404
    Thanks
    2
    Thanked 32 Times in 32 Posts


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •