How do I make a HTML table to be bigger than the default page size -


i have table made html , php(php content) , because of length of of sentences in 1 of sub-sections need width go outside screen(so scrolling goes in width well.

the printed text in 1 of columns full stacktrace android app , because of short length of column, text gets 'squeezed' inside there. how can expand table in width go off screen scrollbar @ bottom appears? i'm going add column need have space enough.

addtionally, because of height of text in 1 of 6 columns other content gets set middle of column. how make text start @ top independantly of other columns?

important code:

<body>         <table border="1" style="border:2px solid black;">             <thead>                 <tr>                     <td>time</td>                     <td>android_version</td>                     <td>device_id</td>                     <td>app_version</td>                     <td>stacktrace</td>                     <td>package</td>                 </tr>             </thead>             <tbody>             <?php                  //etc database stuff                  while($row = mysql_fetch_assoc($result)) {                ?>                      <tr>                          <td><?php echo $row['time'];?></td>                         <td ><?php echo $row['android_version'];?></td>                         <td ><?php echo $row['device_id'];?></td>                         <td ><?php echo $row['app_version'];?></td>                         <td ><?php echo $row['stacktrace'];?></td><!-- part long. other text centered based on length of this. -->                         <td ><?php echo $row['package'];?></td>                      </tr>                  <?php                 }                    ?>                 </tbody>             </table> 

i tried searching it, found questions relating tables going outside default visible screen did not want it. want table full size, if screen expands there scrollbar in width

to make table width bigger can apply css stacktrace column.

if need display in 1 line - use white-space: nowrap;
if need specific width - use min-width: #px or width: #px;

to align elements top of cell use vertical-align: top.

td {    vertical-align: top;  }  td:nth-child(5) {    /*white-space: nowrap;*/    min-width: 500px;  }
<table border="1" style="border:2px solid black;">    <thead>      <tr>        <td>time</td>        <td>android_version</td>        <td>device_id</td>        <td>app_version</td>        <td>stacktrace</td>        <td>package</td>      </tr>    </thead>    <tbody>        <tr>          <td>1975-01-01          <br/>1975-01-01          <br/>1975-01-01</td>        <td>5.3</td>        <td>9/11</td>        <td>0.1.001</td>        <td>lorem ipsum dolor sit amet, consectetur adipiscing elit. morbi nec tortor vitae augue tempus egestas. maecenas dictum dui vitae nisl tempus porta. fusce ac nunc nec magna gravida sodales eget sed massa. integer dapibus pulvinar tortor, ut ultrices          nulla convallis vitae. aenean egestas nunc sem, et efficitur est viverra at. curabitur ipsum ante, commodo ac facilisis vitae, lobortis vitae felis. curabitur dapibus faucibus erat, vitae consectetur est. proin rutrum purus vel massa faucibus          elementum. vivamus venenatis ante nec fringilla. phasellus volutpat eu erat et placerat. quisque diam felis, mollis vel auctor et, dapibus sed nisi. maecenas vitae nisi leo. proin aliquam malesuada nisl, sed imperdiet ligula porta non.</td>        <td>nop!</td>        </tr>    </tbody>  </table>


note

i see using mysql_fetch_assoc -- don't use deprecated functions! use pdo or mysqli


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -