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 10 of 10
  1. #1
    Junior Member
    Join Date
    Aug 2006
    Posts
    1
    Member #
    13648
    I use FrontPage 2000 and am needing help trying to center my website from left to right so that when viewed in 1024 x 728 it is centered and when viewed in 600 x 800 it is centered and takes up the entire page. MSN.com is setup this way. Any help would be greatly appreciated, any other advice would also be appreciated. My website is www.fireprints.com Thanks in advance!

  2.  

  3. #2
    Senior Member Karloff's Avatar
    Join Date
    Oct 2005
    Posts
    744
    Member #
    11702
    can really have a good look at your code but if you add in a container around all you stuff and set the margin = 0 auto, that might work.

    add this to your css
    Code:
    #container { margin : 0 auto;}
    and then this to html just below the <body>

    Code:
    <div id="container">
    then close the div just before the </body>

    Code:
    </div>
    like i said can't see your code so it might not work perectly:classic:

  4. #3
    Senior Member karinne's Avatar
    Join Date
    Dec 2003
    Location
    Aylmer QC Canada
    Posts
    1,607
    Member #
    4335
    Liked
    8 times
    You need to add a width to that containter ... % or px

    Quote Originally Posted by Karloff
    add this to your css
    Code:
    #container { 
      margin : 0 auto;
      width: 780px;
    }
    [a web design portfolio - Currently NOT AVAILABLE for work | web design | Re-coding | PSD-to-HTML]
    I'm also on: virb - facebook - twitter - flickr - del.icio.us

  5. #4
    Senior Member
    Join Date
    Apr 2005
    Location
    Hatfield, England
    Posts
    855
    Member #
    9790
    A wrap all my content in a container div...

    Code:
    <body>
    <div class="container">
    
    Content
    
    </div>
    </body>
    My CSS is...

    Code:
    .container {
    width:800;
    margin-left:auto;
    margin-right:auto;
    }
    This works on all browsers

  6. #5
    Senior Member karinne's Avatar
    Join Date
    Dec 2003
    Location
    Aylmer QC Canada
    Posts
    1,607
    Member #
    4335
    Liked
    8 times
    Quote Originally Posted by Perad
    Code:
    .container {
    width:800;
    margin-left:auto;
    margin-right:auto;
    }
    You don't need to put that ... simple margin: 0 auto; is enough
    [a web design portfolio - Currently NOT AVAILABLE for work | web design | Re-coding | PSD-to-HTML]
    I'm also on: virb - facebook - twitter - flickr - del.icio.us

  7. #6
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Though, since the container is a div, setting margins left and right to auto and using the default div top and bottom of 0 means it works the same.

  8. #7
    Senior Member karinne's Avatar
    Join Date
    Dec 2003
    Location
    Aylmer QC Canada
    Posts
    1,607
    Member #
    4335
    Liked
    8 times
    Huh?
    [a web design portfolio - Currently NOT AVAILABLE for work | web design | Re-coding | PSD-to-HTML]
    I'm also on: virb - facebook - twitter - flickr - del.icio.us

  9. #8
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Because divs have margins of 0 by default, setting just the left and right one to `auto' is the same as setting [minicode]margin: 0 auto;[/minicode].

  10. #9
    Senior Member karinne's Avatar
    Join Date
    Dec 2003
    Location
    Aylmer QC Canada
    Posts
    1,607
    Member #
    4335
    Liked
    8 times
    Yes but ... your saving few bytes by using 1 line of code instead of 2.

    Kinda like saying

    padding-left: 0
    padding-right: 0
    padding-bottom: 0
    padding-top: 0

    is the same as

    padding: 0

    yes but you're better to put the 1 line instead of 4 :glasses:
    [a web design portfolio - Currently NOT AVAILABLE for work | web design | Re-coding | PSD-to-HTML]
    I'm also on: virb - facebook - twitter - flickr - del.icio.us

  11. #10
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    I wasn't questioning your methodology, just pointing out to those who might not know at a glance that it was the same thing, and the reasons for which it was :-)


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:30 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com