• Resolved jeffbroome

    (@jeffbroome)


    I’m working on inserting tables through TablePress in WordPress. I was using the Plugin Options to customize every table I inserted in terms of alignment, padding, font size, etc. However whenever I made a change to “.tablepress-id-3” it would revert “.tablepress-id-2” back to it’s default formatting, instead of my customization, and so on for every table I had created. I finally fixed it by just inserting some Plugin Options to all Tables that temporarily did the trick (.tablepress) with no id#. But now I’m working on some new tables that I need to customize in a very different way (alignment and padding will be very different). What was I doing wrong when I tried to insert the customized code in the Plugin Options? Below is the code I was using before switching to the code for all tables. Thanks! ??

    .tablepress-id-3 tbody td {
    	font-family: Tahoma;
    	font-size: 13px;
    	font-weight: regular;
    	text-align: center;
    }
    
    .tablepress-id-3 .column-1 {
    	text-align: center;
    	width: 700px;
    	padding-right: 140px;
    }
    
    .tablepress-id-3 .column-2 {
    	text-align: center;
    	width: 700px;
    	padding-right: 140px;
    }
    
    .tablepress-id-3 .column-3 {
    	text-align: center;
    	width: 700px;
    }

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    That code is fine from a technical perspective, but I don’t think it achieves the desired result in the best way.
    Instead, this should actually be sufficient for this table:

    .tablepress-id-3 tbody td {
    	width: 33%;
    	font-family: Tahoma;
    	font-size: 13px;
    	text-align: center;
    }

    Just keep in mind that you must add it in addition to any code for table 2, for example.

    Regards,
    Tobias

    Thread Starter jeffbroome

    (@jeffbroome)

    Thanks Tobias. I see where that code is more efficient.
    But that wasn’t really the problem. I hope I can articulate it a little better this time. (Sorry about that.)

    I was working on inserting tables through TablePress in WordPress. I was using the Plugin Options to customize every table I inserted in terms of alignment, padding, font size, etc. However whenever I made a change to “.tablepress-id-3” it would revert “.tablepress-id-2” back to it’s default formatting, instead of my customization, and so on for every table I had created.

    In other words, every time I customized a new table (table 3 for instance), table 2 would revert back to a default format, instead of the customized format I had written for it. Why? How can I stop this from happening?

    Let me know if I’m not explaining this clearly, and I’ll try to do a better job.
    Thanks again,
    Jeff

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    making changes to .tablepress-id-3 does not influence table 2 in any way. My feeling is that you accidentally removed the CSS for table 2 when adding that for table 3.
    Remember that the “Custom CSS” text field contains the CSS code for all tables at once. There’s not a per-table “Custom CSS” field.
    Could you please try again with the updated CSS?

    Regards,
    Tobias

    Thread Starter jeffbroome

    (@jeffbroome)

    Thanks, Tobias. That tip about”Custom CSS” containing codes for all tables did the trick. Thanks!
    But now I have a new (but related) problem:
    I’m finally deviating from my three column format on a new page, where I just want two columns. I want the first column to take up about 59% of the page, and the second column to take up about 41% of the page. Below is the code I’m using, but the results are still showing about 33% for each column, with an empty space for a mysterious third column that I didn’t build into the table: https://jeffreybroome.com/workshops-presentations-draft/

    What do you suggest? Thanks so much. You are very helpful. Here is the code I was using:

    .tablepress-id-15 tbody td {
    	font-family: Tahoma;
    	font-size: 13px;
    	font-weight: regular;
    }
    
    .tablepress-id-15 .column-1 {
    	width: 59%;
    	text-align: left;
    	padding-right: 10px;
    }
    
    .tablepress-id-15 .column-2 {
    	width: 41%;
    	text-align: center;
    	padding-right: 10px;
    }
    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    good to hear that this helped!

    Now, what’s happening on this page is that the content area is actually smaller than on the other pages. The table is actually using the full width that it can.

    To change that, you will have to select the “Full width” page template on the “Edit” screen of that page, just as you did for the other pages.

    Regards,
    Tobias

    Thread Starter jeffbroome

    (@jeffbroome)

    Thanks, Tobias! This helps a lot! ??
    I know I’ll have more questions for you later.
    But this resolves this particular thread of problems.
    Your time and expertise is very much appreciate.
    Best wishes!

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Good to hear that this helped!

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Different Formatting for Different Tables’ is closed to new replies.