Home > front end >  how to fit table in entire the page
how to fit table in entire the page

Time:12-05

i don't want to margin in the page. i just fit the table according to width of page by using html only.

    <title>testing</title>
</head>
<body>
    <table width="100%", cellpadding="0" cellspacing="0" bgcolor="#f3971b" border="1px">
        <tr>
            <td><font face="arial" size="10">Home</font></td>
            <td><font face="arial" size="10">Services</font></td>
            <td><font face="arial" size="10">Testimonials</font></td>
            <td><font face="arial" size="10">Contact</font></td>
            <td><font face="arial" size="10">Message</font></td>
        </tr>
    </table>

</body>
[enter image description here][1]

CodePudding user response:

I think the below CSS code might help to fit the table in the entire window,

body
{
    height : 100%;
    weight : 100%;
    padding :0;
    margin:0;
}
<iframe name="sif1" sandbox="allow-forms allow-modals allow-scripts" frameborder="0"></iframe>

CodePudding user response:

You can use CSS for full-width tables like --

<style>
   table {
       border-collapse: collapse;
       width: 100%;
       border: 1px solid #ddd;
   }

   th, td {
       text-align: left;
       padding: 16px;
   }
</style>
  • Related