change this - to this -
and this - to this -
and see if that helps. -- Murray --- ICQ 71997575 Adobe Community Expert (If you *MUST* email me, don't LAUGH when you do so!) ================== [url]http://www.dreamweavermx-templates.com[/url] - Template Triage! [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes ================== "superdk" wrote in message news:eo0lfg$jr$1@forums.macromedia.com...[quote] > I'm building a site using CSS and using 'absolute positioning' to align > each > area (no tables). Now that everything is positioned properly, how do I > get the > whole site centered? In the past I'd 'center align' the outside table, > but how > do I do it using css. > Thank for any help, > Dave > >[/quote] [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => Murray *ACE* [ip] => forums@HAHAgrea [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 2 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> centering site using CSS - HTML & CSS

centering site using CSS - HTML & CSS

I'm building a site using CSS and using 'absolute positioning' to align each area (no tables). Now that everything is positioned properly, how do I get the whole site centered? In the past I'd 'center align' the outside table, but how do I do it using css. Thank for any help, Dave...

  1. #1

    Default centering site using CSS

    I'm building a site using CSS and using 'absolute positioning' to align each
    area (no tables). Now that everything is positioned properly, how do I get the
    whole site centered? In the past I'd 'center align' the outside table, but how
    do I do it using css.
    Thank for any help,
    Dave


    superdk Guest

  2. #2

    Default Re: centering site using CSS

    > I'm building a site using CSS and using 'absolute positioning' to align
    > each
    > area (no tables).
    That's usually always the wrong approach. Most well-built, CSS-based sites
    use no positioning at all. If you are putting text into these layers you
    are in for a bumpy ride....

    Make sure you read this -

    [url]http://www.great-web-sights.com/g_layerlaws.asp[/url]

    Anyhow, change this -

    </head>

    to this -

    <style type="text/css">
    <!--
    body { text-align:center; }
    #wrapper { text-align:left; width:760px; margin:0 auto;position:relative; }
    /* 760px will display on an 800px screen maximized browser window without */
    /* horizontal scrollbars. */
    -->
    </style>
    </head>

    change this -

    <body ...>

    to this -

    <body ...>
    <div id="wrapper">

    and this -

    </body>

    to this -

    <!-- /wrapper -->
    </div>
    </body>

    and see if that helps.


    --
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================


    "superdk" <webforumsusermacromedia.com> wrote in message
    news:eo0lfg$jr$1forums.macromedia.com...
    > I'm building a site using CSS and using 'absolute positioning' to align
    > each
    > area (no tables). Now that everything is positioned properly, how do I
    > get the
    > whole site centered? In the past I'd 'center align' the outside table,
    > but how
    > do I do it using css.
    > Thank for any help,
    > Dave
    >
    >

    Murray *ACE* Guest

  3. #3

    Default Re: centering site using CSS


    Hi,

    If you are using CSS 100% on your site and no table mix match that som
    are doing here.. Good.. quick trick to position things is;

    <div id="container">

    Your content

    </div>

    the css should look like

    div#container {margin:0;margin-left:auto;margin-right:auto}

    That shall do it. Let me know how it works out for you. Hope
    helped

    --
    CatBone

    XHTMLIT.COM - PSD T
    XHTML/CSS CONVERSION SERVICE (\"HTTP://WWW.XHTMLIT.COM\"
    Get your Design (.PSD or .PNG) converted into valid XHTML & CSS fas
    and easy.
    We cut, crop and professionally hand code it within 24 hours or you
    money back guaranteed
    Visit [url]http://www.hostingforum.ca[/url] toda

    CatBones Guest

  4. #4

    Default Re: centering site using CSS

    try:
    ..wrapper {
    margin: 0px 0px 0px -380px;
    width: 760px;
    left:50%;
    }
    dMacIsCoderX Guest

Similar Threads

  1. Vertical Centering
    By stay_asleep in forum Macromedia Dynamic HTML
    Replies: 4
    Last Post: December 15th, 01:49 PM
  2. Need Help Centering a SWF on page
    By LeifKolt in forum Macromedia Dynamic HTML
    Replies: 3
    Last Post: August 4th, 08:49 PM
  3. Centering
    By analog@logwell.com in forum Web Design
    Replies: 4
    Last Post: June 26th, 03:12 AM
  4. Web Page Centering in Pub XP
    By Don Schmidt in forum Web Design
    Replies: 0
    Last Post: July 24th, 01:10 AM
  5. centering layers
    By snakeinthefly webforumsuser@macromedia.com in forum Macromedia Dreamweaver
    Replies: 2
    Last Post: July 17th, 08:11 PM

Bookmarks

Posting Permissions

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