• Resolved wordinvestor

    (@wordinvestor)


    Hello TobiasBg,
    I read many support tickets about column width.
    I tried many solutions but still custom width is not working.
    Please tell me how can i fix column width because one column contain button i made with ultimate short code plugin. It need to be in one line but it is in 2 rows.

    .tablepress-id-1 .column-5 {
    	width: 190px !important;
    }
    
    .tablepress-id-1 .column-2 {
    	width: 100px;
    }
    
    .tablepress-id-1 .column-3 {
    	width: 100px;
    }
    
    .tablepress-id-1 .column-4 {
    	width: 100px;
    }
    
    .tablepress-id-1 .column-1 {
    	width: 150px;
    }

    table

    • This topic was modified 7 years, 6 months ago by wordinvestor.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Instead of changing the column widths, you should simply disallow automatic line breaks here, by adding e.g. this:

    .tablepress-id-1 .column-5 {
      white-space: nowrap;
    }

    Regards,
    Tobias

    Thread Starter wordinvestor

    (@wordinvestor)

    Thank you very much Tobias.
    Yes your suggested code resolved my problem.
    And also thank you very much for fast reply.
    Best Regards

    Thread Starter wordinvestor

    (@wordinvestor)

    And one suggestion if you can add check box option to display vertical line border between columns.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Good to hear that this helped!

    Adding a checkbox for such a vertical border is not something that I’m planning. It will only make the user interface much more complicated, because I would then have to add buttons for other styling options as well. I think it’s easier to use CSS code for this as well, like

    .tablepress-id-1 thead th,
    .tablepress-id-1 tbody td {
      border: 1px solid #cccccc;
    }

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Custom css not working for table width’ is closed to new replies.