CMS Development

Jlawal
Top Contributor

Table alignment

Hello all 🙂

 

I'm having some issues with table alignment on this page. I have been trying to build it for mobile first as the majority of our users use mobiles to access our site.

 

On desktop and mobile the table aligns to the left. How can i center the table on both?

 

It would be great if anyone had tips on how to use the space on the right (please see image below) to make the first text column a bit wider.

 

Any help would be greatly appreciated.

 

Many thanks,

Jamila

0 Upvotes
1 Reply 1
dennisedson
HubSpot Product Team
HubSpot Product Team

Table alignment

@Jlawaladd

table{
  margin: 0 auto
}

to center the table. if you have multiple tables, you will need to be more specific with the rule. 

You have a % value set for the table size:  At a certain screen width, would be good to set that to a higher value which will allow more width to the columns.  If that is enough, you will need to reevaluate the widths that you have set for all of the columns at smaller screen sizes.  They are all % values now.