html - Table not taking up 100% of the screen width -


i have table of items this

as can see, table not take entire width of screen(the width of image width of screen, app being designed mobile devices)

the html generated display looks this:

<table>     <tbody>         <tr>             <td>                 <span style="display: table; min-width: 320px; max-width: 640px; border-top: 1px solid #f6f6f6; width: 100%;">                     <div style="display: table-row;">                         <div style="display: table-row; float: left;">                             <div><b>r8,383.00</b></div>                             <div>                                 <img style="float: left;" src="../resources/img/icon_circle_footer.png" width="20px" height="20px">                                 emirates                             </div>                         </div>                         <div style="display: table-row; float: left;">                             <div>                                 <div>                                     <span><b>13:30</b></span> - 07:00                                 </div>                                 <div style="display: table-row;">18h 30m, 1-stop</div>                            </div>                             <div>                                <div>                                    <span><b>14:25</b></span> - 16:25                                 </div>                                 <div style="display: table-row;">25h 0m, 1-stop</div>                             </div>                         </div>                         <div  style="display: table-row; float: right;">                             <img style="float: right;" src="../resources/img/icon_circle_footer.png" width="20px" height="20px">                         </div>                     </div>                 </span>             </td>         </tr>     </tbody> </table> 

i didn't bother including styles colors fonts. reason image wide, because set minimum width of 320px, , made last image float right.

setting min-width 100% does not work. i'm @ wits end here, , appreciate if can lend it.

demo

if have try give <table width="100%"></table>

or make class table{width:100%;} both of work

html

<table width="100%">     <tbody>         <tr>             <td>                 <span style="display: table; min-width: 320px; max-width: 640px; border-top: 1px solid #f6f6f6; width: 100%;">                     <div style="display: table-row;">                         <div style="display: table-row; float: left;">                             <div><b>r8,383.00</b></div>                             <div>                                 <img style="float: left;" src="../resources/img/icon_circle_footer.png" width="20px" height="20px">                                 emirates                             </div>                         </div>                         <div style="display: table-row; float: left;">                             <div>                                 <div>                                     <span><b>13:30</b></span> - 07:00                                 </div>                                 <div style="display: table-row;">18h 30m, 1-stop</div>                            </div>                             <div>                                <div>                                    <span><b>14:25</b></span> - 16:25                                 </div>                                 <div style="display: table-row;">25h 0m, 1-stop</div>                             </div>                         </div>                         <div  style="display: table-row; float: right;">                             <img style="float: right;" src="../resources/img/icon_circle_footer.png" width="20px" height="20px">                         </div>                     </div>                 </span>             </td>         </tr>     </tbody> </table> 

demo2

css

table{     background-color:yellow;     width:100%; } 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -