How can I set the text in the TD auto width?

  • Hi everyone,

    I know quite some things about CSS and wordpress, but with this issue I’m not getting any further, despite googling.

    I frequently use tables on my (www.yory.nl), but usually with a small width.
    My code is very pure: <table><tr><td>

    I’ve been playing with the { table-layout: auto; } but this doesn’t give the any effect.

    I would like to aut0 set the width of the cell according to the width of the text.
    How can I do this?

    See my screenshots, of which 2a is photoshopped.

    Hope you can give me any tips!

    [img]https://i.postimg.cc/m2SxcSJ3/Screenshot-2.jpg[/img]
    [img]https://i.postimg.cc/vHZG7B96/Screenshot-2a.jpg[/img]

  • Hi there,

    Your site is not hosted with us on WordPress.com, nor are you using any of our themes, so we’re not really able to help with this.

    As this is more of a general CSS question rather than a WordPress-specific one, a coding forum like StackOverflow.com might be the best place to ask for help with this.

    But also try contacting support for the theme you’re using – they might be able to help.

    https://generatepress.com/support/

    General support for the version of WordPress you’re using can be found here:

    https://wordpress.org/support/forums/

  • The topic ‘How can I set the text in the TD auto width?’ is closed to new replies.