You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Offline

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

Please create a new Ticket and we will get back to you as soon as we can.

#117334 Fixed width of a cell

Posted in ‘Editor’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by dupinsan on Tuesday, 16 September 2025 17:09 BST

dupinsan

Hello,
I would like to create a table with fixed width for cells (ex: 500px).
However, the cells widen over the entire width of the (responsive) page, which I do not want.
I tried to replace Width with Max-Width, but that doesn't change anything.
How to do it?

Ryan

However, the cells widen over the entire width of the (responsive) page, which I do not want.

Please post a link to an example on your site.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

dupinsan

Here is the link (this is a test site) :
https://www.tests.fredericdupin.fr/carte-ufpmtc

I would like each column to measure only 240 px, and not 50% of the width of the page because I want to do like a card

Ryan

In yout template stylesheet - templates/test-1/css/template.css the following css rule is causing the issue:

/* table default style */
table {
	width: 100%;
	margin-bottom: 18px;
}

Override this in the user.css (or custom.css) file with the following:

/* table default style */
table {
	max-width: 100%;
}

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

dupinsan

Thank you very much for your help.
Unfortunately, that hasn't changed anything.
On the other hand, I found the solution: just indicate the total size in pixels for the table.
It's very silly, but I hadn't thought about it ;-)

Attachments