Hey everyone!

With the Labour Day holidays coming up, we’d like to let you know about our upcoming working hours:

Thursday, May 1st: Our team will be off during Labour Day.
Friday, May 2nd: We'll also be off for an extended holiday break.

We’ll be back on Monday, May 5th, ready to respond to all messages received during this time.

In the meantime, if you need help, feel free to:

https://www.youtube.com/@AmeliaWordPressBookingPlugin/videos

https://www.youtube.com/@wpDataTables/videos

Thank you for being so understanding, and we hope you enjoy the long weekend! 

Okay
  Public Ticket #3445350
column width adjustment
Closed

Comments

  • fei started the conversation

    I want to adjust the width of the table.
    You can adjust it by dragging and dropping the border with the mouse, but you want to specify 100 px or 30% for each column.

  •  1,894
    Miloš replied

    Hi fei,

    I think you are using Simple Table type, since they are the only ones that can be dragged for the width, right?

    -

    There are two ways how you can control the width of Simple Table columns.

    1.  You can simply grab the edge between two columns, and click + drag to change the width of the columns directly like that :

    3774424115.png

    2. Or,  if you wish to use CSS ,

    you can add a CSS class directly in a cell of a table,  and then you can edit, for example, for cell number 1 :

    <div class="abc">Some text 123</div>

    Then on the front end, we would add this custom CSS:

    td .abc {
       width: 350px;
    }

    and this will change the column width on the front end.

    It is a similar method to do any CSS rules that you wish to apply.

    -

    In order to apply this CSS,  you can either apply it directly to the WordPress page where the table is,

    Custom code needs to be applied to the page where the booking form is. Depending on what you're using (Gutenberg blocks, or some page builder), adding the CSS or JS can be done in a few different ways. 

    If you need help with adding custom CSS to the page, please take a look at this article.

    -

    Or you can add this CSS in the main plugin settings/Custom JS and CSS/Custom CSS.

    If you need to add 'targeting' only a specific Table ID, you can add this to the CSS :

    #wpdtSimpleTable-2 td .abc {
        width: 350px;
    }

    Where the ID 2 would be replaced by your Table ID.


    Let me know if that helps.smile.png

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables