Prevent one table column from wrapping

[ad_1]

I created two “2-column” tables with 15-20 rows. The first column contains years (eg: 2024) and the second contains text.

When I create a 2 column block on a page and put one table in each the year column (td) breaks/wraps into two lines when the column width is reduced. 2024 wraps and 1-2 digits go to a second line. I can’t find any “nowrap” option for a column in the available options.

I tried adding nowrap inside the td HTML tags but that didn’t work.

Is there a way to target the first column in a 2-column table and set it to not wrap?

I found the following css in a forum post relating to using Tablepress. But I’d rather find a solution using Twenty-Twenty-Four’ s built-in table function.

.tablepress-id-3 th,
.tablepress-id-3 td {
  width: 50%;
}

Thanks for any help 🙂

  • This topic was modified 10 hours, 11 minutes ago by rpmtl22.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer