Table Borders Twenty Eleven

  • Unknown's avatar

    How do I customize Twenty Eleven CSS to show table borders with cell padding? Default is to show horizontal lines but not vertical lines. I did figure out how to get a complete grid but in doing so lost cell padding and could not get padding to be recognized. I want a collapsed border (single line grid) but with appropriate cell spacing.
    Thanks for help!

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Hi there,

    One way to add table borders and padding is to add the styles to the table code you put on your page. Here’s an example of the code you can use to do that:

    <table style="border-collapse:collapse;">
    <tbody>
    <tr>
    <td style="border:1px solid #ddd;padding:10px;">TEXT HERE</td>
    <td style="border:1px solid #ddd;padding:10px;">TEXT HERE</td>
    <td style="border:1px solid #ddd;padding:10px;">TEXT HERE</td>
    </tr>
    <tr>
    <td style="border:1px solid #ddd;padding:10px;">TEXT HERE</td>
    <td style="border:1px solid #ddd;padding:10px;">TEXT HERE</td>
    <td style="border:1px solid #ddd;padding:10px;">TEXT HERE</td>
    </tr>
    </tbody>
    </table>

    Alternately, you can add those styles using Custom CSS (that’s included in the WordPress.com Premium plan you have on your blog). To add custom CSS, go to your My Blogs page and click the Customize link under the blog’s title. In the Customizer, open the CSS section and in the CSS editor there, you can enter the following CSS:

    .entry-content table {
    	border-collapse: collapse;
    }
    
    .entry-content td {
    	border: 1px solid #ddd;
    	padding: 10px;
    }

    That CSS should have the same effect, but adding it there means you won’t have to add it every time you put a table on your site. Please let me know if you have any questions about that. :)

  • Unknown's avatar

    Thank you!! I had the right code put was missing the “.entry-content” portion. Weirdly I was able to get a table background with the code I was using and even the table borders but not the padding.
    Is there some place I can find common css codes applied to twenty eleven for common situations? Each simple thing – applying a table border should be a simple thing! – I have to search through the web and the forum, try to find something similar to what I’m doing, usually strike out since it does not apply to wordpress.com css customization (most are wp.org or independently hosted and have different access to the code) or can’t find my simple question. Is there someplace you can direct me for common codes so this web site does not have to be so time consuming on the smallest of details? I want to unbold sidebar menu text, copy widgets (custom sidebar menus), copy menus, etc, etc – simple things to save time or change look. Thank you for any help on this!

  • Unknown's avatar

    Hi there,

    I’m glad that worked for you. :) For finding the CSS that your site is using, I’d recommend using the tips we have here: How to Find Your Theme’s CSS

    You can also check our CSS Customization forum for customizations that others have done on their WordPress.com sites here:

    https://en.forums.wordpress.com/forum/css-customization

    If you don’t find what you’re looking for there, you can post a question to that forum and some of our expert staff and volunteers can help you out with the CSS you need.

  • Unknown's avatar

    Thank you! I do have my theme’s css code and I do search the customization forum first but would love to find a central place that provides the simple code: change site title size and color, change distance from site title to picture bar, table format changes, heading changes (most of twenty eleven headings are exactly the same (!) and H3 is too small to be usable), etc. All of these things I’ve had to figure out and others have had to too I’m sure but it would be great to have a clearing house – maybe within the forum – where such things are collected. It is hard to find others with my very simple – and standard – changes I am seeking. I do really appreciate that my questions are answered by you all. In the future I will come to you all sooner instead of working so hard to find the answer on my own.

  • The topic ‘Table Borders Twenty Eleven’ is closed to new replies.