Search code examples
htmlcssstylesheet

css align table


i'm new to html and i'm having problems moving the table down the page. http://tinypic.com/view.php?pic=eqdpjb&s=7 . I tried setting the 'margin-top: 400;' which works however the navigation bar at the top (i created in dreamweaver using the navigation 'wizard') moves as well to the bottom of the page!. How can i fix this? i want to move only the table without affecting the navigation bar been driving me nuts!

css

table{
    background: whitesmoke;
    border-collapse: collapse;
    margin-right: auto;
    margin-bottom: 0;
    margin-left: auto;
}

Solution

  • If you are adding margin-top: 400px; to table and it also moves the navigation, then that either means the navigation is also a table or the navigation is within the table.

    If the navigation is also a table you will have to give the bottom table a unique id and then add the margin to that id only.

    If the navigation is within the table, put it in its own div.

    If it's none of the above you will have to post some HTML.