Jump to content

Space between Table/Table Cell elements


_tech_dude_

Recommended Posts

You might try setting the left and right margins of the table to "auto" with CSS. If you wanted your table width to be 60% of the containing element and you wanted it centered, you could do something like:

<div id="theContainingElement">  <table style="margin: 0px auto; width: 60%;" cellspacing="0">  ...  </table></div>

Link to comment
Share on other sites

To center the entire table you can add the following to it's code:

<TABLE ALIGN="CENTER">

If you want the text to be aligned you can do this in the following way:

<TD ALIGN="CENTER">Content</CENTER>

These things can also be achieved without the use of .CSS, if you prefer to use .CSS I would suggest you learn it before you start using it in case you get stucked ore something goes wrong.Ruud Hermans.

Link to comment
Share on other sites

Why is the center tag depriciated, I still use it and always will!
You can do whatever you want, but don't expect your documents to always work.
DeprecatedA deprecated element or attribute is one that has been outdated by newer constructs. Deprecated elements are defined in the reference manual in appropriate locations, but are clearly marked as deprecated. Deprecated elements may become obsolete in future versions of HTML. User agents should continue to support deprecated elements for reasons of backward compatibility.Definitions of elements and attributes clearly indicate which are deprecated.This specification includes examples that illustrate how to avoid using deprecated elements. In most cases these depend on user agent support for style sheets. In general, authors should use style sheets to achieve stylistic and formatting effects rather than HTML presentational attributes. HTML presentational attributes have been deprecated when style sheet alternatives exist (see, for example, [CSS1]).ObsoleteAn obsolete element or attribute is one for which there is no guarantee of support by a user agent. Obsolete elements are no longer defined in the specification, but are listed for historical purposes in the changes section of the reference manual.
The point is to separate structure from presentation. Structure goes in the HTML document, and presentation goes in the CSS document. You can use whatever deprecated things you want, but be aware that at some point they will become obsolete and browsers may just stop supporting them. Some doctypes already do not support them.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...