Jump to content

Code block HTML content (table) doesn't respond to screen width on mobile

Go to solution Solved by Harrison76,

Recommended Posts

Hi There
 

I wonder if anyone can help with some suggested code. I have a 'Fees' table on a legals page on my website. I inserted some html into a code block but it doesn't respond down to the mobile page width. Everything is fine on desktop, just the mobile view that is an issue. Is there some code I can add to the block to make it 100% of page width?

Any help would be greatly appreciated

P
 

Screenshot 2024-05-22 at 09.52.02.png

Link to comment
On 5/24/2024 at 12:32 PM, Harrison76 said:

Hi tuanphan, apologies for the delayed reply.

The website page is https://www.banqeta.com/fees

Password: Banqeta100

Use this code to Website > Website Tools > Custom CSS

@media screen and (max-width:767px) {
div.code-block table {
    width: 100% !important;
}
div.code-block table td, div.code-block table th {
    padding-left: 2px !important;
    padding-right: 2px !important;
}
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.