Iframe alignment issue in Dreamweaver CS3

Discussion in 'Web Design and Development' started by terrorcrew, Jun 4, 2008.

  1. terrorcrew macrumors newbie

    Joined:
    Jun 4, 2008
    Location:
    Desert, Ca
    #1
    Ok so im having issues aligning an iframe to center in Dreamweaver CS3. Left and right work great, but it wont center. Any ideas why??

    heres the code.

    <iframe src="iframe.html" name="iframe" width="592" height="400" align="center" scrolling="auto" id="iframe" allowtransparency="true" application="true"></iframe>

    Thanks!
     
  2. ert3 macrumors 6502a

    ert3

    Joined:
    Dec 10, 2007
    #2
    You may need to drop it into a div and use CSS to center the thing.

    An easier, albiet dated, method would be to use tables and horizontally aline the table to center.
     
  3. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #3
    The align="center" only applies to things placed inside the iframe. Using CSS you can add a margin property like so,
    Code:
    iframe {
     margin: 0 auto;
    }
    This'll at least work for browsers other than IE.
     
  4. terrorcrew thread starter macrumors newbie

    Joined:
    Jun 4, 2008
    Location:
    Desert, Ca

Share This Page