How Column header get “left-aligned”?
-
Hello,
Currently, the font of the column label is centered.
Is there a way to align column headings to the left?
Maybe by a CSS command?Thx & Regrads,
Max
-
Hi,
thanks for your post, and sorry for the trouble.
Please try adding this to the “Custom CSS” textarea on the “Plugin Options” screen of TablePress:
.tablepress thead th { text-align: left; }Regards,
TobiasHi Tobias,
thank you for quick answer an d the CCS Code.
In addition to my question:
Can I also fix the column header “font” and “font size” in the same way?
may also the change the “font color”.Best regards,
MaxHi Max,
yes, that’s possible. The extended code for that would be
.tablepress thead th { text-align: left; font-family: Arial; font-size: 12px; color: #ff0000; }Regards,
TobiasHi Tobias,
Thanks for the support.
I have inserted your CSS code. Everything works as described.
Unfortunately, not aligning the text to the left. It remains centered.
Maybe something collides in my CSS code?
Here are the current entries:**************
.tablepress-id-2 {
width: auto;
margin: 0 auto 1em;
}.tablepress .row-hover tr:hover td {
background-color: #CEE3F6;
}.tablepress-id-2 tbody td {
font-family: Tahoma;
font-size: 13px;
color: #000000;
}.tablepress thead th {
text-align: left;
font-family: Tahoma;
font-size: 13px;
color: #ff0000;
}.tablepress-id-2,
.tablepress-id-2 tr,
.tablepress-id-2 tbody td,
.tablepress-id-2 thead th,
.tablepress-id-2 tfoot th {
border: none;
}.tablepress-id-2 .column-1 {
width: 70px;
}.tablepress-id-2 .column-2 {
width: 120px;
}.tablepress-id-2 .column-3 {
width: 350px;
}.tablepress-id-2 .column-4 {
width: 100px;
}.tablepress-id-2 .column-5 {
width: 350px;
}
***********************Thanks and regards,
MaxHi,
please try changing the line
text-align: left;
to
text-align: left !important;
then. This basically increases its priority.Regards,
TobiasHi Tobias,
thank you for answer.
I changed the CSS line.
It is now so, that during the page construction, the headings are aligned very short left. But if this break in the collaps mode, however, this left alignment disappears again.
Can this be related to the collapse mode?
Here my Screenshots :
b) after collaps Mode is working…
Regards,
MaxHi Max,
weird… 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! (Just screenshots are not enough for that 🙁 ).
Regards,
TobiasHi Max,
this might be related to the Horizontal Scrolling that is used for this table. Can you please try turning that checkbox off?
Also, please add this to the “Custom CSS”:.tablepress { table-layout: auto; }Regards,
TobiasHi Tobias,
thank you so much for helping me with my problems.
All works fine now 🙂Regards,
Max-
This reply was modified 9 years ago by
maxraudive.
Hi,
no problem, you are very welcome! 🙂 Good to hear that this helped!
Best wishes,
TobiasP.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!
….I did 😉
Hi,
thanks, I really appreciate it!
Best wishes,
Tobias -
This reply was modified 9 years ago by
The topic ‘How Column header get “left-aligned”?’ is closed to new replies.