WordPress.org

Ready to get started?Download WordPress

Forums

table formatting code (4 posts)

  1. tangerine3
    Member
    Posted 2 years ago #

    I want to make a table with 3 equal columns and 2 rows with no white space around text and in between rows, is this the correct code? thank you.

    <table width="100%">
    <tbody>
    <tr>
    <td>put text here</td>
    <td>put text here</td>
    <td>put text here</td>
    </tr>
    <tr>
    <td>put text here</td>
    <td>put text here</td>
    <td>put text here</td>
    </tr>
    </tbody>
    </table>
  2. peredur
    Member
    Posted 2 years ago #

    Depends on what's in your style sheet.

    And depending on what version of HTML you're using, width may not be a valid attribute of the <table> element.

    Have you tried your code out? Does it give the results you want? If not, can we have a link to your site so we can see what's going on?

    Cheers

    PAE

  3. tangerine3
    Member
    Posted 2 years ago #

    somebody else created my css for me but i looked through my css in my dashboard and these are the references i found pertaining to tables.

    '
    table.position
    {
    position: relative;
    width: 100%;
    table-layout: fixed;
    }

    /* begin Layout */
    .art-content-layout
    {
    display: table;
    position:relative;
    margin: 0 auto;
    table-layout: fixed;
    border-collapse: collapse;
    background-color: Transparent;
    border: none !important;
    padding:0 !important;
    width:100%;
    margin-top:0;
    margin-bottom:0;
    }
    '
    I don't know what version of HTML means. I have a private page i'm experimenting on for this certain table because it is a work in progress I don't have a public page for you to see but there seems to be alot of white space inbetween the rows.

    And specifically i'm just making certain i am using the right code to start and end the table. If you tell me how to attach a doc with a screen shot I could do that. thank you.

  4. peredur
    Member
    Posted 2 years ago #

    Well, this is a WordPress support forum. We're not here to help people learn to code HTML.

    But as far as it goes and with the caveat about the width attribute (not valid in HTML5), your code looks OK. Whether or not it'll do what you want with white space, I'm not sure offhand. Why don't you just try it and see? There's nothing you can write in HTML (except for style attributes, I guess) that will determine that. It's a CSS issue.

    If you use the code and it doesn't do what you want, if you post a link to your site we should be able to tell you why and suggest what you might do about it.

    Cheers

    PAE

Topic Closed

This topic has been closed to new replies.

About this Topic