Jump to content

HMTL Table responsiveness

Recommended Posts

Hi there, I am attempting to arrange some text in a table on my website. I have used a codeblock with HTML for the page content and. Everything is going pretty well, even managed to underline hyperlinks within the codeblock. However, when I switch to the mobile view, the table does not adjust in width as it should. Can I please get advise on how to make the table responsive? Thank you.

https://www.amstelbeheer-ict.com/legal/privacy-policy

Best regards,

Ihab Khiri
www.workplaceconsultant.com

Link to comment

By adding the HTML tag <div style="overflow-x:auto;">, I made the table responsive. Kindly suggest if you have any better approach. Here's the code:

<div style="overflow-x:auto;"><table border="1" cellpadding="1" cellspacing="1">
    <tbody>
        <tr>
            <td style="width:200px"><strong>Left column header</strong></td>
            <td style="width:900px">Table text right column with increased with compared to left column</td>
        </tr>
    </tbody>
</table> </div>

 

Best regards,

Ihab Khiri
www.workplaceconsultant.com

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.