WordPress.org

Ready to get started?Download WordPress

Forums

[Twenty Eleven] Table border problem (6 posts)

  1. HCM-webmaster
    Member
    Posted 2 years ago #

    I'm local-testing some pages under theme Twenty Eleven v1.3 (WP 3.3.1) and am having some problems with TABLE sizes and borders.

    Using this as a simple example to test:

    <table border="0" width="100px">
    <tr>
    <td style="width:20%;height:100px;background-color:#FF0000;vertical-align:top;text-align:center;">XX</td>
    <td style="width:80%;height:100px;background-color:#FFff00;vertical-align:bottom;text-align:center;">YY</td>
    </tr>
    </table>

    It behaves as expected so far as alignment and relative column widths go.
    BUT...

    1/ Regardless of how I specify the table width, it always goes to 100% of the page width
    2/ Regardless of how I specify borders, I get a top and bottom border to the table, and no side borders.

    At this stage I'm using the original theme styles without modification. (Child style created, but not yet doing anything special.)

    Any clues for the clueless?

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    It will be a CSS issue. Try using Firefox with the Firebug add-on for this kind of work.
    http://getfirebug.com/

  3. HCM-webmaster
    Member
    Posted 2 years ago #

    Thanks esmi,

    Better than just a canned answer, you gave me a tool that I could use to work it out for myself! :-)

    I knew it was in CSS - this helped me to find it.

    Cheers,
    Nick

  4. esmi
    Forum Moderator
    Posted 2 years ago #

    Glad I could help :-)

  5. MiniC
    Member
    Posted 2 years ago #

    I was searching the same today to fix the layout in articles with the schedule from the plugin event calendar 3 in articles.

    The solution is to find in the original file style.css of the Twenty Eleven Template (Line 772 to 777):

    .entry-content table,
    .comment-content table {
    	border-bottom: 1px solid #ddd;
    	margin: 0 0 1.625em;
    	width: 100%;
    }

    All table widths are set here to 100%, but its easy to change if you delete line 772 (.entry-content table,)
    or write your own arguments between .entry-content table and .comment-content table inside a new {}

  6. esmi
    Forum Moderator
    Posted 2 years ago #

    Do not edit the Twenty Eleven theme. It is the default WordPress theme and having access to an unedited version of the theme is vital when dealing with a range of site issues. Create a child theme for your changes. Once your child theme is active, we should be able to help with the customisation.

Topic Closed

This topic has been closed to new replies.

About this Topic