background color
-
Hi,
I want to change the background color, but only for cells which have content.Is this possible?
-
Hi,
thanks for your post, and sorry for the trouble.
You could try some “Custom CSS” like
.tablepress-123 td:not(:empty) { background-color: #ff0000 !important; }Note that this will not work in older browsers.
Regards,
TobiasGreat!
Thank you very much!
But now, there is another problem I cant solve.
Is it possible to assign a link to a row? Or a cell?
But in the art, that the link will remain in the line if I move this.Is it possible to sort automatically by default the table in the art, that the row with the highest value in the row with the prices is the highest etc.? The values are in the kind of 295 / 245 / 180, 250 / 170 / 98, …….
But! For distances between the cells with content, i created cells without content between… every second row and every second column is empty.
I’m trying to build a new website in modern style. My actually site is http://www.hiddenseeservice.de
On the site ‘objekte’ you can see the table i’m trying to do new…..Unfortunately the table i create new is in local area on my Macbook….
How to solve the filters above the table? Do you have an idea for that?
If the new project will go online with this table, of course i will donate the table…
Unfortunately my english is bad, but i hope you can understand what my problems are… ansonsten müsste ich es in deutsch schreiben… 😉
Is it possible to sort automatically by default the table in the art, that the row with the highest value in the column with the prices is the highest etc.? The values are in the kind of 295 / 245 / 180, 250 / 170 / 98, …….
Sorry…. i meant column…
Regards
HartwigHello Hartwig,
no, sorry, that’s not directly possible. It would require a new sorting algorithm that first extracts the highest value from the three values in a cell.
I suggest that you create three columns here, one for each of the the three values.Adding a link to a cell is possible with the “Insert Link” button below the table. That will add some HTML code for the link, and that will of course stay in the row even after sorting or moving it.
Leaving every second row and every second column empty is not a good idea. You can usually achieve this with CSS styling, in a much easier way.
For the filters, you can use the TablePress Extension from http://tablepress.org/extensions/datatables-columnfilterwidgets/
It will however not group the elements (like “2 bis 4 Pers.”), but show them individually.Regards,
TobiasHi Tobias,
thank you for the fast answer.
Is it possible to do sorting with a hidden column?
“Leaving every second row and every second column empty is not a good idea. You can usually achieve this with CSS styling, in a much easier way.”
Hmm…. but in that way i can make a border around the top-row (without borders between the cells), i would have gaps in the top and bottom borderline between the cells if i would have ‘normal’ distance between the cells, would i?
What would be the code for distances between the cells?
Regards,
HartwigHi,
sorting on a hidden column? I don’t understand. If the column is not visible, where do you want to click to trigger the sorting?
I’m not exactly sure what you mean with that border around the top row. I suggest that you get this table up and running as far as possible and then put it on a server somewhere. We can then work on styling it.
The distance between the cell can be changed with the
border-spacingproperty. That’s however kind of outdated and I wouldn’t use it. (In fact, I’d not even use vertical borders in a table, as those make the table data harder to read.)Regards,
TobiasHi,
thanks for the screenshot. Now I understand.
For that, it might then actually make sense to use those empty rows and columns as dividers. As the header is continuous, there’s no CSS equivalent that I can think of.
So, for this, you can then keep the current table structure.Regards,
TobiasHi again,
okay, i deleted the empty rows and columns and created a white border around the cells.
So now i have the tiles again. But how to create a two colored border?
It would be nice to have around the cell first a border with 1 px in darkblue and around the blue a white colored border with 7 px.
Is this possible?Regards,
Hartwigbtw. whats about cellspacing? Then i would need only one border……
I tried this:
.tablepress-id-1 td { border-collapse: seperate !important; border-spacing: 10px !important; } .tablepress-id-1 td { border: 1px !important; border-color: #000066 !important; border-style: solid !important; }but it didn’t works……
Hi,
the cell spacing needs to be added to the table, not the cells:
.tablepress-id-1 { border-collapse: seperate !important; border-spacing: 10px !important; }Regards,
Tobias
The topic ‘background color’ is closed to new replies.