Title: Table CSS styling
Last modified: August 20, 2016

---

# Table CSS styling

 *  Resolved [bbhammer](https://wordpress.org/support/users/bbhammer/)
 * (@bbhammer)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/table-css-styling/)
 * Hi
    I’ve created a table using a CSS-generator ([http://tablestyler.com/](http://tablestyler.com/)).
 * From that I end up with html and CSS codes. I can’t see from the CSS codes where
   I can set the width and hight of the entire table. Right now it just fills out
   the entire body space.
 * Is there a clever head who can point out the code that I should change:
 * > .datagrid table { border-collapse: collapse; text-align: left; width: 100%;}.
   > datagrid {font: normal 12px/150% Arial, Helvetica, sans-serif; background: #
   > fff; overflow: hidden; border: 1px solid #991821; -webkit-border-radius: 3px;-
   > moz-border-radius: 3px; border-radius: 3px; }.datagrid table td, .datagrid 
   > table th { padding: 3px 10px; }.datagrid table thead th {background:-webkit-
   > gradient( linear, left top, left bottom, color-stop(0.05, #991821), color-stop(
   > 1, #80141C) );background:-moz-linear-gradient( center top, #991821 5%, #80141C
   > 100% );filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=’#991821′,
   > endColorstr=’#80141C’);background-color:#991821; color:#FFFFFF; font-size: 
   > 15px; font-weight: bold; border-left: 1px solid #B01C26; } .datagrid table 
   > thead th:first-child { border: none; }.datagrid table tbody td { color: #80141C;
   > border-left: 1px solid #F7CDCD;font-size: 12px;font-weight: normal; }.datagrid
   > table tbody .alt td { background: #F7CDCD; color: #80141C; }.datagrid table
   > tbody td:first-child { border-left: none; }.datagrid table tbody tr:last-child
   > td { border-bottom: none; }.datagrid table tfoot td div { border-top: 1px solid#
   > 991821;background: #F7CDCD;} .datagrid table tfoot td { padding: 0; font-size:
   > 12px } .datagrid table tfoot td div{ padding: 2px; }.datagrid table tfoot td
   > ul { margin: 0; padding:0; list-style: none; text-align: right; }.datagrid 
   > table tfoot li { display: inline; }.datagrid table tfoot li a { text-decoration:
   > none; display: inline-block; padding: 2px 8px; margin: 1px;color: #FFFFFF;border:
   > 1px solid #991821;-webkit-border-radius: 3px; -moz-border-radius: 3px; border-
   > radius: 3px; background:-webkit-gradient( linear, left top, left bottom, color-
   > stop(0.05, #991821), color-stop(1, #80141C) );background:-moz-linear-gradient(
   > center top, #991821 5%, #80141C 100% );filter:progid:DXImageTransform.Microsoft.
   > gradient(startColorstr=’#991821′, endColorstr=’#80141C’);background-color:#
   > 991821; }.datagrid table tfoot ul.active, .datagrid table tfoot ul a:hover {
   > text-decoration: none;border-color: #80141C; color: #FFFFFF; background: none;
   > background-color:#991821;}
 * You can see the result of this [here](http://sikkervaccination.dk/?s=thailand).

Viewing 1 replies (of 1 total)

 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [13 years, 4 months ago](https://wordpress.org/support/topic/table-css-styling/#post-3406688)
 * Your query may be better suited to a CSS forum like [http://CSSCreator.com/forum](http://CSSCreator.com/forum)

Viewing 1 replies (of 1 total)

The topic ‘Table CSS styling’ is closed to new replies.

## Tags

 * [table](https://wordpress.org/support/topic-tag/table/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * Last activity: [13 years, 4 months ago](https://wordpress.org/support/topic/table-css-styling/#post-3406688)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
