Coder Social home page Coder Social logo

Comments (17)

TobiasBg avatar TobiasBg commented on July 19, 2024

Hi,

thanks for your post, and sorry for the trouble.

Can you please post a link to the page with the table where this problem happens, so that I can take a direct look? Thanks!

Regards,
Tobias

from tablepress.

ollly1363 avatar ollly1363 commented on July 19, 2024

This is the code I tried:

.tablepress td,
.tablepress th {
text-align: center;
vertical-align: middle;
}

from tablepress.

ollly1363 avatar ollly1363 commented on July 19, 2024

Hi Tobias, I'm a novice at WordPress. I'll put the table on a sample page as I've been working on it only previewing on the actual page. I'll do that now.

from tablepress.

ollly1363 avatar ollly1363 commented on July 19, 2024

Here's a test page with the table in question, I will re-apply the custom CSS now.

http://www.scalepreventionusa.com/792-2/ β€Ž

Thanks in advance.

from tablepress.

ollly1363 avatar ollly1363 commented on July 19, 2024

I did the following as I don't want to text align center on all of my tables:

.tablepress td,
.tablepress th {
vertical-align: middle;
}

from tablepress.

ollly1363 avatar ollly1363 commented on July 19, 2024

I'd also like to make the table background #ffffff

from tablepress.

TobiasBg avatar TobiasBg commented on July 19, 2024

There are several issues here:

Please don't add extra table HTML into the cells (like that <td valign="middle"></td>.
Also, text (in the third column) should not be wrapped in <h4> tags. Those are for headings only.

To set the background color, just uncheck the "Alternating row colors" checkbox for the table.

To then vertically align the cell, please use this "Custom CSS":

.tablepress tbody td,
.tablepress thead th {
  vertical-align: middle;
}

from tablepress.

ollly1363 avatar ollly1363 commented on July 19, 2024

Understood, thanks, it's great when you know how! The was me experimenting to see if I could get that done. I'm more familiar with html than anything else. Regarding the

tags I did that as I wanted to easily use that particular style, what should I use as an alternative?

from tablepress.

ollly1363 avatar ollly1363 commented on July 19, 2024

I don't know why that posted as bold?

from tablepress.

TobiasBg avatar TobiasBg commented on July 19, 2024

It posted as bold as you did not escape the <h4> tags. You can of course keep using those, but it might be better to assign the desired font style to the cells, in the same way as you assign the alignment.

from tablepress.

ollly1363 avatar ollly1363 commented on July 19, 2024

OK great, thanks for your help Tobias

from tablepress.

ollly1363 avatar ollly1363 commented on July 19, 2024

How about cell padding?

from tablepress.

TobiasBg avatar TobiasBg commented on July 19, 2024

Padding can be set e.g. like this:

.tablepress tbody td,
.tablepress thead th {
  padding: 20px;
}

from tablepress.

ollly1363 avatar ollly1363 commented on July 19, 2024

Thanks, and how do I limit this to one table so I don't mess up the other tables on the site?

from tablepress.

TobiasBg avatar TobiasBg commented on July 19, 2024

For that, you'd use the ID-based CSS selectors, see https://tablepress.org/faq/css-selectors/

from tablepress.

DXDWXIKI avatar DXDWXIKI commented on July 19, 2024

hi TobiasBg'
i also have this same issue.
I just changed the font size of table by adding this CSS:

.tablepress tbody td {
font-size: 15px;
}

But this code is working on Desktop, Not in Mobile.

from tablepress.

TobiasBg avatar TobiasBg commented on July 19, 2024

Hi @DXDWXIKI,

Can you please post a link to the page with the table where this problem happens, so that I can take a direct look? Thanks!

Regards,
Tobias

from tablepress.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.