How can i get a table to be placed in the center of the page? I can only get it to the middle.

Recommended Answers

All 2 Replies

Two techniques for you:

Put your ENTIRE TABLE into an outer table, with one row, and one cell. Set that cell to "align=center":

<td align="center">

<!- your inner table HERE ->


The second technique is to assign a proper doctype (you need to learn about doctypes), and use CSS. The CSS style, applied to your main containers (like the body tag) would be "margin: 0 auto". This means "0" top margin, and "automatic" left/right margins.

thankx for your help

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.