Sunday, November 4, 2012

css how to center a table?


how to center using css
MORE IMPORTANTLY,
css how to center a table?

container div, and table within.

<div id="price">
<table class="class-table-center">


/*** Center table in its container: .class ***/
table.class-table-center { /*** How to center align table in its container div. ***/
margin: auto;
}



http://webdesign.about.com/od/tables/qt/tiptablecenter.htm
http://www.granneman.com/webdev/coding/css/centertables/

http://www.w3.org/Style/Examples/007/center.en.html

CENTERING THINGS

A common task for CSS is to center text or images. In fact, there are three kinds of centering:


This small paragraph is vertically centered.

DIV.container {
    min-height: 10em;
    display: table-cell;
    vertical-align: middle }
...
<DIV class="container">
  <P>This small paragraph is vertically centered.
</DIV>













No comments:

Post a Comment