Professional Web Applications Themes

Center table on page. - Macromedia Dynamic HTML

My url is [url]http://www.lc.capellauniversity.edu/~167007/[/url] I am trying to center my table on the browser window when opened. I tried 5% ( top margin ) but that is not enough. I saw that designers were using 100% but that place my table too far down the page. Is it just a matter of guessing percentages? I know that there is an easier way. I am not up to speed on CSS yet . I would like to do this in XHTML or what ever code that you see that was produced by Dreamweaver in my project. Any advice would be appreciated. ...

  1. #1

    Default Center table on page.

    My url is [url]http://www.lc.capellauniversity.edu/~167007/[/url]

    I am trying to center my table on the browser window when opened. I tried 5% (
    top margin ) but that is not enough. I saw that designers were using 100% but
    that place my table too far down the page. Is it just a matter of guessing
    percentages? I know that there is an easier way. I am not up to speed on CSS
    yet . I would like to do this in XHTML or what ever code that you see that was
    produced by Dreamweaver in my project. Any advice would be appreciated.
    Thanks Ed

    lonewolfjujutsu Guest

  2. #2

    Default Re: Center table on page.

    The way to do it is to set (using CSS) the top of the table (or preferably a
    container <div> tag) to 50%, and then set the top margin to minus half the
    height of the table. You can use the same technique to centre it
    horizontally too. So, for example,

    ..container_class
    {
    position:relative; top:50%; left:50%; width:600px; height:400px;
    margin-top:-200px; margin-left:-300px;
    /*any other CSS stuff you want*/
    }

    If you want this to work with XHTML, you'll also need to set the height of
    both the <body> and <html> tags to 100%.




    lonewolfjujutsu wrote:
    > My url is [url]http://www.lc.capellauniversity.edu/~167007/[/url]
    >
    > I am trying to center my table on the browser window when opened. I
    > tried 5% ( top margin ) but that is not enough. I saw that designers
    > were using 100% but that place my table too far down the page. Is it
    > just a matter of guessing percentages? I know that there is an easier
    > way. I am not up to speed on CSS yet . I would like to do this in
    > XHTML or what ever code that you see that was produced by Dreamweaver
    > in my project. Any advice would be appreciated. Thanks Ed

    rob::db Guest

  3. #3

    Default Re: Center table on page.

    How do you know the height of the table?

    --
    Murray --- ICQ 71997575
    Team Macromedia Volunteer for Dreamweaver
    (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
    ==================

    "rob::db" <robdigitalburn.net> wrote in message
    news:dbf85c$7g5$1forums.macromedia.com...
    > The way to do it is to set (using CSS) the top of the table (or preferably
    > a
    > container <div> tag) to 50%, and then set the top margin to minus half the
    > height of the table. You can use the same technique to centre it
    > horizontally too. So, for example,
    >
    > .container_class
    > {
    > position:relative; top:50%; left:50%; width:600px; height:400px;
    > margin-top:-200px; margin-left:-300px;
    > /*any other CSS stuff you want*/
    > }
    >
    > If you want this to work with XHTML, you'll also need to set the height of
    > both the <body> and <html> tags to 100%.
    >
    >
    >
    >
    > lonewolfjujutsu wrote:
    >> My url is [url]http://www.lc.capellauniversity.edu/~167007/[/url]
    >>
    >> I am trying to center my table on the browser window when opened. I
    >> tried 5% ( top margin ) but that is not enough. I saw that designers
    >> were using 100% but that place my table too far down the page. Is it
    >> just a matter of guessing percentages? I know that there is an easier
    >> way. I am not up to speed on CSS yet . I would like to do this in
    >> XHTML or what ever code that you see that was produced by Dreamweaver
    >> in my project. Any advice would be appreciated. Thanks Ed
    >
    >

    Murray *TMM* Guest

Similar Threads

  1. Aligning image to the center of the page
    By AXeLpro in forum Macromedia Dynamic HTML
    Replies: 4
    Last Post: October 26th, 06:55 AM
  2. table to absolute center :::: really easy one.
    By Brian in forum Macromedia Dynamic HTML
    Replies: 1
    Last Post: August 11th, 02:50 PM
  3. Center of a page alignement
    By Artur_Chojnacki@adobeforums.com in forum Adobe Indesign Windows
    Replies: 4
    Last Post: July 29th, 10:20 PM
  4. How to center web page?
    By catcpet in forum Web Design
    Replies: 2
    Last Post: May 7th, 03:05 AM
  5. Should I center the page while working on it?
    By JND1993 webforumsuser@macromedia.com in forum Macromedia Dreamweaver
    Replies: 0
    Last Post: July 25th, 01:54 AM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139