•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the HTML and CSS section within the Web Development category of DaniWeb, a massive community of 423,879 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,170 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 7942 | Replies: 2
![]() |
Two techniques for you:
Put your ENTIRE TABLE into an outer table, with one row, and one cell. Set that cell to "align=center":
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.
Put your ENTIRE TABLE into an outer table, with one row, and one cell. Set that cell to "align=center":
<html> <head></head> <body> <table> <tr> <td align="center"> <!- your inner table HERE -> </td> </tr> </body> </html>
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.
![]() |
•
•
•
•
•
•
•
•
DaniWeb HTML and CSS Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Align floated images in center of page with CSS (HTML and CSS)
- Print 5 records per table row (see script) (Perl)
- CSS center vertical (HTML and CSS)
- updating 2 HTML tables on one PHP page (PHP)
Other Threads in the HTML and CSS Forum
- Previous Thread: How do i set a page as a Home Page
- Next Thread: Very new Programmer needs basic help!!!



Linear Mode