Center table on page.

Ask a Question related to Macromedia Dynamic HTML, Design and Development.

  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. Similar Questions and Discussions

    1. table to absolute center :::: really easy one.
      I have all my content in a table, which I would like to display in the absolute center of my browser (center vertically and horizontally). I can...
    2. Center of a page alignement
      How can I center an object on the page? Equivalent of P within CorelDraw. Thank you in advance. AC
    3. How to center web page?
      How do I center my web page created in publisher?
    4. Finding middle/center of page
      Is there a simple way to find the center of a page? I am working on an image which is not evenly sized, so my brain cannot do the math and find the...
    5. Should I center the page while working on it?
      Hi, Thanks again for any help. I know the best size to keep the tables is 760, but my question is while im working on the page should I center...
  3. #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

  4. #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" <rob@digitalburn.net> wrote in message
    news:dbf85c$7g5$1@forums.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

Posting Permissions

  • You may not post new threads
  • You may 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