[pmwiki-users] Min width of cells in table
Petko Yotov
5ko at 5ko.fr
Sun Jul 6 21:53:55 PDT 2025
On 06/07/2025 22:27, Thomas Hirtenlehner wrote:
> Does anyone know of an easy way to set the minimum width of a cell to
> a certain amount of pixels?
> I made a table with Icons in one column and a description in the
> second, and the icons get distorted on mobile (Chrome).
> So I figured, if I set the min width to the slice of the Icon this
> should solve the problem?
For a simple table, you can add a class to the table, for example:
|| class=icontable border=1
Then in your pub/css/local.css you can define the width of the second
(2) column:
.icontable td:nth-child(2) {
width: 50px;
}
But if you want to make it nicer on mobile, you could display just
paragraphs:
%lfloat% Attach:icon1.png %% '''Label 1''' \\
Description 1
%lfloat% Attach:icon2.png %% '''Label 2''' \\
Description 2
This should look better on mobile as the text reflows to adapt to the
available screen width, and may even be easier to edit.
Petko
More information about the pmwiki-users
mailing list