Can’t gid rid of table borders

  • “vertical-align:middle;” would apply to text only or also to images or other entities which could be vertically aligned in a table?

  • Based on these revelations, made the following changes to code I used to center that pesky audio player. I had already changed it to get rid of the table borders.

    I changed it from this:

    <div align="center">
    <table style="border: 2px solid rgb(255, 255, 255);" border="0"><tbody><tr><td>
    [audio http://www.fileden.com/files/2009/2/26/2340110/Elton%20John/Elton%20John%20-%20Levon.mp3|artists=Elton John|titles=Levon|remaining=yes|animation=no]
    </td></tr></tbody></table>
    </div>

    To this:

    <div style="text-align: center;">
    <table style="border: medium none ;"><tbody><tr><td>
    [audio http://www.fileden.com/files/2009/2/26/2340110/Elton%20John/Elton%20John%20-%20Levon.mp3|artists=Elton John|titles=Levon|remaining=yes|animation=no]
    </td></tr></tbody></table>
    </div>

    Not only did the borders return, but I lost my centering as well! The original code had evolved from a lot of trial and error trying to center that darned audio player, and it finally looks like I want it. Although I’d still like to know why I had to go through all of that to accomplish what should have been so simple, my concern now is for the future functionality of this code.

    Any thoughts?

  • I don’t know what happened there! What I typed in the first example for the border color was <table border=”0″ style=”border:solid 2px #ffffff;”>. What I typed in the second example for the table def was

    . If I can’t even get this thing to accurately reproduce my input, how can I even ask for help?

  • I’m not sure I understand the question. Since you’re using a fixed-width theme, the simplest way to center an audio player is this:

    <div style="margin-left:155px;">
    SHORTCODE_HERE
    </div>
  • That works just fine, until you change themes. When I center text, it stays centered regardless of the theme. It should work that way with anything I place on the page. Size, of course, is a different matter. That’s why I try to keep the size of images and other objects small enough to fit the themes I’m likely to try. It’s difficult enough for us novices to produce attractive output as it is. The WP.com environment should make the process easier, not harder.

  • I see. In that case you can center the item for good by putting it in the middle cell of a 3-cell table row:

    <table width="100%" style="border:none;">
    <tr>
    <td style="border:none;"></td>
    <td width="290px;" style="border:none;">SHORTCODE_HERE</td>
    <td style="border:none;"></td>
    </tr>
    </table>

    Works no matter what the main column width of the theme.

  • I tried this in a test post, and it worked! I’m not sure why the “border:none;” code didn’t work when I tried it before. I’ll have to go back to find out what I did wrong.

    Thanks.

  • The topic ‘Can’t gid rid of table borders’ is closed to new replies.