Tables – Don't do it

  • Unknown's avatar

    Ah, I found some sites. Sorry if I’ve wasted anyone’s time.

  • Unknown's avatar

    a) As I mentioned in my first reply in this thread, you need to examine the stylesheet of the theme to understand what the theme imposes (which means what you may need to change or override). The defaults in Twenty Ten are:
    table: 100% width, 1px light grey border around
    each cell: top and bottom padding 6px, left and right padding 24px, 1px light grey border above only.

    b) Re your questions:

    1. Font size shouldn’t change unless you specify a different size. Please link to a post or page with the issue in question.

    2. The default padding sets a limit to how small the height can be. Better not use height in the opening td tags and adjust the padding instead. Same goes for width.

    3. You need to add this in the style attribute of each opening td tag:
    border:1px solid #000000;

    4. The color is determined by the hex number with the # before it. The number 000000 in Tess’s example is pure black. For colors and hex numbers see here:
    http://www.december.com/html/spec/color.html

    5. Don’t use width in the style attribute of the opening td tags: add it in the style attribute of the opening table tag instead. To create a “small table, left-justified, and put text beside it”, you need this in the opening table tag:
    style=”width:NNNpx;float:left;border:1px solid #HEX;”

    c) Could you link to some of the sites you found? If you mean table tutorials, first they cannot take into account the quirks of your theme, second most of them still give the deprecated coding you’re using at he moment, much of which doesn’t work.

  • Unknown's avatar

    Re 5: I forgot to provide for some space to the right of the table. Should be:
    style=”width:NNNpx;float:left;border:1px solid #HEX;margin-right:12px;”

  • Unknown's avatar

    Sites I was looking at that I wasn’t sure of:
    http://www.w3schools.com/html/html_tables.asp
    http://www.w3.org/TR/html4/struct/tables.html
    http://www.htmlgoodies.com/tutorials/tables

    timethief’s site which I thought was probably reliable: :)
    http://onecoolsitebloggingtips.com/2008/03/31/how-to-make-html-tables-for-your-wordpress-blog/

    Sites timethief linked to that I suspected would be good:
    http://pubs.logicalexpressions.com/pub0009/LPMArticle.asp?ID=36
    http://www.2createawebsite.com/build/table_tutorial.html
    http://wpbtips.wordpress.com/2010/06/15/overriding-table-borders/ (this one I felt pretty confident about :))

    Just for my own education, you gave the defaults for TwentyTen in your opening paragraph, but where do I find that kind of detail?

    As to the specifics:
    1) It was only my eyes playing games with me. What I described definitely happens in the Visual WP editor (the text in the table gets smaller if you change the colour) but it has no impact when you publish. I thought it did, but checked more carefully today and it doesn’t. Sorry for wasting your time.
    2-5) thank you for your help.

    Financial formulas? Check. Visual C++? Check. Biblical Greek and Hebrew? Check. But HTML turns me into a blathering idiot…. :)

    Thanks again.

  • Unknown's avatar

    You’re welcome.
    As I expected, all the tutorial pages you’ve found are outdated. (My own post isn’t, but it’s not a table tutorial, it’s just one piece of coding to modify one table default.) I’ll write a table tutorial eventually, but you’ll have to wait long: I’ll do an article on HTML first, then one on inline CSS then tables.

    To find the defaults of the theme, you go to Appearance > Custom Design > CSS and click View Original Stylesheet. If your HTML and CSS aren’t as good as your Greek and Hebrew, you won’t like what you’ll see!

  • The topic ‘Tables – Don't do it’ is closed to new replies.