Blog, Website & Page Publishing

laura_kit
Member

Table not responsive on mobile

SOLVE

Hi there

 

We are building a landing page where we have a table to compare different products however the table isn't responsive on mobile. We would like to be able to scroll horizontally on mobile, we tried a few things here and there that we found on this community but nothing seems to work. Is anyone able to help please?

Thank you

0 Upvotes
1 Accepted solution
Wesimplifi_
Solution
Top Contributor | Platinum Partner
Top Contributor | Platinum Partner

Table not responsive on mobile

SOLVE

Hi @laura_kit,

To fix the issue, wrap your table in a div like this:

<div class="responsive-table-wrapper">
  <table>
    <!-- your table rows and columns -->
  </table>
</div>

 Then add this CSS to your landing page stylesheet or custom module:

.responsive-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.responsive-table-wrapper table {
  width: 100%;
  min-width: 600px; /* Adjust as needed */
  border-collapse: collapse;
}

 

Test your table using HubSpot’s preview in mobile view and also on real devices. Sometimes browser-based previews don’t show the full mobile experience, especially for touch scrolling.

RevOps & Automation Strategist | Growth Without Limits.

View solution in original post

4 Replies 4
Wesimplifi_
Solution
Top Contributor | Platinum Partner
Top Contributor | Platinum Partner

Table not responsive on mobile

SOLVE

Hi @laura_kit,

To fix the issue, wrap your table in a div like this:

<div class="responsive-table-wrapper">
  <table>
    <!-- your table rows and columns -->
  </table>
</div>

 Then add this CSS to your landing page stylesheet or custom module:

.responsive-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.responsive-table-wrapper table {
  width: 100%;
  min-width: 600px; /* Adjust as needed */
  border-collapse: collapse;
}

 

Test your table using HubSpot’s preview in mobile view and also on real devices. Sometimes browser-based previews don’t show the full mobile experience, especially for touch scrolling.

RevOps & Automation Strategist | Growth Without Limits.

laura_kit
Member

Table not responsive on mobile

SOLVE

amazing thanks so much it is working!!!

GiantFocal
Top Contributor | Gold Partner
Top Contributor | Gold Partner

Table not responsive on mobile

SOLVE

Hi @laura_kit,

 

This depends on the theme used. Would you mind sharing the page URL?

Best regards,
Ernesto @ GiantFocal
Found this answer helpful?
Marking it as the solution helps both the community and me - thanks in advance!
BérangèreL
Community Manager
Community Manager

Table not responsive on mobile

SOLVE

Hi @laura_kit, I hope that you are well!

Great question, thanks for asking the HubSpot Community and well done on researching previous posts on the Community! 🙌

In your research, did you find these amazing answers:

- The solutions from @Anton and @Kevin-C on this post "Making a responsive table using CSS"
- The solution from @Teun on this post "Table display on mobile"

I'd love to ask our Top Experts as well: Hi @Anton and @Jake_Lett do you have other suggestions or tips to add to help @laura_kit, please?

Have a wonderful day and thanks so much in advance for your help! ❤️
Bérangère


HubSpot’s AI-powered customer agent resolves up to 50% of customer queries instantly, with some customers reaching up to 90% resolution rates.
Learn More.


Saviez vous que la Communauté est disponible en français?
Rejoignez les discussions francophones en changeant votre langue dans les paramètres! !
0 Upvotes