• Resolved triviafrog

    (@triviafrog)


    Can’t I use common HTML table codes in the twenty ten theme? I have a simple four square HTML table and I want one of the cells to correct to the simple valign=”top” code and the theme seems to ignore it. I’m probably missing something here… thanks in advance for any help.

    Here’s an example of the problem: Notice sports won’t line up with video.
    https://triviafrog.com/?p=311

Viewing 5 replies - 1 through 5 (of 5 total)
  • That is because the theme uses a CSS reset

    table, caption, tbody, tfoot, thead, tr, th, td {
    	margin: 0;
    	padding: 0;
    	border: 0;
    	vertical-align: baseline;
    	background: transparent;
    }

    You will have to add another css rule to override the reset.

    Thread Starter triviafrog

    (@triviafrog)

    Thanks for the reply, I’ll look into it. Could it be as easy as changing

    vertical-align: baseline;

    to

    vertical-align: top;
    ?

    It would be better to add a new rule after the CSS reset. If you look at the style sheet the reset rule also includes more selectors that I listed above and you would be changing all of them if you did that.

    Thread Starter triviafrog

    (@triviafrog)

    I found the issue. Apparently the twenty ten theme does not like it when you have no text or nothing but media embed code in one of the cells. As soon as I added “Video in 1987” over the youtube embed code the cells correctly aligned.

    Thanks.

    I also have an alignment issue. I am using Twenty Ten 1.2 and WP3.1.2.

    I have 3 column table. I insert a graphic in column 1 and text in column 2 and 3. With the default style.css, the text will align on the baseline. I want the text to align in the middle or the top. Taking the direction from the previous discussion from c3mdigital, I altered the css by adding the following code after the original reset code at the beginning of the style sheet:

    table{
    background: transparent;
    border: 0;
    margin: 0;
    padding: 0;
    vertical-align: top;
    }

    I can change top to middle in the vertical-align and I do not get a change in the alignment – the text continues to align on the baseline.

    here is my table code:
    <table border=”0″ cellspacing=”0″ cellpadding=”0″ width=”500″>
    <tbody>
    <tr>
    <td><img class=”alignnone size-thumbnail wp-image-418″ title=”Bail” src=”https://twogatherbeads.com/wp-content/uploads/2011/05/Unknown-150×150.jpg&#8221; alt=”” width=”150″ height=”150″ /></td>
    <td>b</td>
    <td>b</td>
    </tr>
    </tbody>
    </table>

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Trouble using HTML tables in twenty ten theme WP 3.0’ is closed to new replies.