Formatting Pages with Tables
![]() |
Tables are both a saving grace for page layout and a curse of old technology. Controlling simple tables is really pretty easy, but (naturally) there are ‘traps and tricks’ that can catch you. Learning some table basics, though, will help you build interesting pages easily, using columns and ‘blocks’ of content.
Most websites and themes are designed using ‘style sheets’, so to change table behavior ‘site wide’ you need to know what you’re doing. If you aren’t comfortable changing your stylesheet, it’ll be safer for you to control table borders and space around content as you work on each individual page. When you make a table in the WordPress editor with TinyMCE Advanced or Windows Live Writer you can set such things if you pay attention, but it’s easy to forget. (We covered these in our article ‘Immediately Productive with WordPress‘.) Quite often your work might not look the way you expect. If you don’t have an advanced HTML / web editing program, editing tables can be frustrating! I’ll step you through some of these issues as painlessly as I can! |
|
What are tables good for?
You’re looking at a page formatted with tables. Without tables, the entire page would be one large column of content – kind of like this paragraph. Using tables, I’ve been able to have some areas with two wide columns, some parts with narrow side columns for art and a wide center area for text, etc. |
Parts of Tables
![]() |
To control table appearance you will change overall width, number of rows and columns, borders around the entire table and spacing inside and between cells. You can also change background colors or use images as backgrounds. Using styles, you can even control the borders of individual cells. Cell Padding The space between your content and the edges of your table is set with the ‘padding’ inside each cell. Cell Spacing The space between cells and between cells and the outer border of the table is set with ‘cell spacing’. Borders Border size and color as well as background colors can also be set, including for individual cells. ‘Default’ attributes for table appearance throughout the website are often set in the style sheet. Unless you read through it you won’t know how it is set up. |
|
|||
![]() |
Seeing your work When you set borders to “0″, in the WordPress edit window you’ll see dashed lines instead of borders (see the circled area in the image at left).
===> What you see in the editor display is probably not exactly what you will see in the browser! You should constantly preview your work using the ‘preview changes’ button above the blue ‘update’ button. |
|
Start off easy – keep it simple
Same thing with invisible borders
A little more style…
|







