How To Change Column Width In A Table

Skip to content
WordPress.org

Forums

  • Welcome to Support
  • Guidelines
  • Get involved
  • Log in
  • Welcome to Support
  • Guidelines
  • Get involved
  • Log in
Skip to content

Home / Plugin: E2Pdf - Export Pdf Tool for WordPress / how to change column width in a table

Search for: Search forums
  • ulisesglz

    (@ulisesglz)

    4 years, 3 months ago

    hello, I build a formidable view that has a table and included the shortcode inside an HTML object in my template; some columns display only a digit and every column is getting the same width when pdf is rendered, I’d like to set the columns witdh to get a better use of the space between cells.

    I’ve tried using css display:table, and using width attribute on <th> and <td> but nothing has the desired effect

    could you give any advice?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Oleksandr

    (@oleksandrz)

    4 years, 3 months ago

    Hi,

    To set width you must be able to use “width” attribute on <td> tag, <table> also can accept “cellpadding” attribute to increase space inside cells.

    <table border=”1″ cellpadding=”5″> <tbody> <tr><td width=”20%”>1</td><td>2</td></tr> <tr><td>3</td><td>4</td></tr> </tbody> </table>

    Result attached on screenshot: https://imgur.com/a/5nFmfOw

    We remain at your service.

    Thread Starter ulisesglz

    (@ulisesglz)

    4 years, 3 months ago

    that really worked, thank you!

    now I’d like to show only the horizontal borders on my table, I tried using style=”border-top: 1px solid #b7b7b7;” but nothing happened

    once again i’d apreciate your help

    Plugin Author Oleksandr

    (@oleksandrz)

    4 years, 3 months ago

    Unfortunately E2Pdf doesn’t yet support setting borders separately (border-top, border-bottom), however we added this point to add this CSS feature in future releases. As soon as it will be released we will update this thread to notify you. Sorry for inconvenience.

    We remain at your service.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘how to change column width in a table’ is closed to new replies.
  • E2Pdf - Export Pdf Tool for WordPress
  • Frequently Asked Questions
  • Support Threads
  • Active Topics
  • Unresolved Topics
  • Reviews
  • In: Plugins
  • 3 replies
  • 2 participants
  • Last reply from: Oleksandr
  • Last activity: 4 years, 3 months ago
  • Status: not resolved

Từ khóa » Html Change Column Sizes