Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 8 of 8
  1. #1
    Junior Member
    Join Date
    Dec 2004
    Posts
    2
    Member #
    8528
    I have always designed webpages using dreamweaver (photoshop and imageready to design and slice). Now I want to design my site mostly using flash, but then bring it into dreamweaver and give it a background color and center it on the page. i don't know how to use CSS, and looking at the other responses to centering a page on the forums it seems as thats the only way to do it? please be simple with your responses especially when talking in code, i'm new at that!
    Any help is greatly appreciated!!

    this is not the finished product AT ALL...but to just give you an example of what i want centered.
    www.melissapuleo.com

  2.  

  3. #2
    Senior Member
    Join Date
    Mar 2004
    Posts
    241
    Member #
    5465
    Whenever I want to center my page, I just do the entire page. Then put everything into a 1x1 borderless table, then just center the table.

  4. #3
    Senior Member mossoi's Avatar
    Join Date
    Apr 2003
    Location
    Englandshire, United Kingdomsville y'all!
    Posts
    1,111
    Member #
    1206
    Liked
    1 times
    A simple way to do this without editing the content is to put this:
    Code:
    <style>
       body {
    	 margin: 0px auto; 
    	 width: 700px; /* Your choice */
    	}
    </style>
    Within the HEAD of the page.

    It's a good idea to avoid using a table for layout purposes.

  5. #4
    Member HAViK's Avatar
    Join Date
    Aug 2004
    Location
    Perris, CA
    Posts
    50
    Member #
    6930
    Yeah that's what I do too... I just put everything in a borderless table and align="center", and if you put the height and width to that borderless table to 100% and valign="middle" then the website should be centered out.
    SORIA Inc. My First Stab At Creating A Site...

  6. #5
    Member HAViK's Avatar
    Join Date
    Aug 2004
    Location
    Perris, CA
    Posts
    50
    Member #
    6930
    Quote Originally Posted by mossoi
    A simple way to do this without editing the content is to put this:
    Code:
    <style>
       body {
    	 margin: 0px auto; 
    	 width: 700px; /* Your choice */
    	}
    </style>
    In the within the HEAD of the page.

    It's a good idea to avoid using a table for layout purposes.
    I like that. I just hadn't figured out how to do it yet, I'm relatively new. Heh.
    SORIA Inc. My First Stab At Creating A Site...

  7. #6
    GDS
    GDS is offline
    Junior Member
    Join Date
    Jan 2005
    Posts
    5
    Member #
    8799
    There is a downside that was failed to be mentioned, I hate to break it to you, but using "auto" for the margin property in CSS does not work in Internet Explorer 5 and earlier versions of Internet Explorer.

  8. #7
    Senior Member mossoi's Avatar
    Join Date
    Apr 2003
    Location
    Englandshire, United Kingdomsville y'all!
    Posts
    1,111
    Member #
    1206
    Liked
    1 times
    That's true but it's best to serve different CSS to IE5 anyway as it does a bad job of rendering many things.

  9. #8
    Member themayanlion's Avatar
    Join Date
    Mar 2005
    Posts
    40
    Member #
    9225
    actually, one way to do it that works in most browsers, including IE, is acombination of both. wrap all your content in a div, and add these styles.

    Code:
    body {
    text-align: center;
    }
    
    div#wrapper {
    margin: 0 auto;
    }
    as for the poster, the markup for the page would look like this
    Code:
    <html>
    <title>Your Page</title>
    <head>
    <style type="text/css">
    body {
    text-align: center;
    }
    
    div#wrapper {
    margin: 0 auto;
    }
    </style>
    </head>
    
    <body>
    <div id="wrapper">
    Your flash movie here.
    </div>
    </body>
    </html>


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 02:51 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com