Support » Plugins » [Plugin: TablePress]Lots of space in table

  • page: http://www.therealmoforcs.com/countries/
    table id: countryList_page
    Relevant Custom CSS Code:

    /* countryList_page table  */
    .entry-content .tablepress-id-countryList_page {
    	margin: 1em 0;
    }
    
    .tablepress-id-countryList_page td {
    	text-align: center;
    }
    
    .tablepress-id-countryList_page img {
    	margin: 0 auto;
    }

    I knew the basics of CSS, but my friend is helping me use Firefox’ Inspect Tool to learn how I need to define my CSS to make the specific changes I want.

    Unfortunately, I only know enough to get myself in trouble. There’s a lot of space between the rows on that table. It’s nitpicky — it’s not like it wouldn’t work — but it looks so blocky. I’d like the text close to the flag below it.

    I’ve tried doing, say…[pseudocode]

    .tablepress-id-id td (with&w/o body) h2: vertical-align: bottom
    .tablepress-id-id td (body) img: vertical-align: top

    and various padding and margin fixes I pulled up with google. The inspect tool isn’t even showing any CSS that adds padding or margin, so I’m not sure how to work with the space in this case.

    I want to add, for the author, this plugin is useful for trial-and-erroring your way through CSS ‘powers of importance’ and whatnot. Getting everything to look the way I want is a pain in the butt. But it’s being done the right way with proper coding, so my professional-type friend isn’t facepalming at amatuerish code, and I’m learning in the process.

Viewing 1 replies (of 1 total)
  • Hi,

    thanks for your post, and sorry for the trouble.

    The main problem here really is the margin on the h2 elements.
    Please try adding

    .tablepress-id-countryList_page h2 {
        margin: 0;
    }

    to remove them, as outlined in your previous thread about TablePress.

    And yes, getting everything to look nice here is a little tricky, as your theme also adds CSS that affects the elements in your table (like those h2 elements).

    Regards,
    Tobias

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: TablePress]Lots of space in table’ is closed to new replies.