html - How to make a <td> as a new row using external css? -


i new stack overflow , i'm trying make mobile webpage existing desktop version webpage else created. basically, have use same webpage both mobile , desktop. specific page table, trying change pattern of table mobile using external style sheet.i had attached html skeleton , css post. initially, there 1 row 2 s. want bring ".td2" new in next line. tried basic table in able bring down converted tr worked in case, second containing table making me hard. tried way could. helpful if me.

tr{      display:table;      width:100%;  }  .lfttbl .td1, .td2{      display:table-row;      border-bottom: solid 1px #2b9ed5 !important;  }
<table class="out">      <tr><td>          <table class="outtbl">          <tr>          <td>              <table class="lfttbl">                  <tr>                      <td class= td1>                         <p> hihi hii                      </td>                    <td class= td2>                          <table class = rttbl"">                                                        </table>                      </td>                  </tr>              </table>          </td>      </tr>  </table>

there lot of bugs in code:

  1. <p> not closed!
  2. using tables layout.
  3. more worse: using nested tables.

going ahead layout, able make these corrections make work in css.

tr{      display:table;      width:100%;  }  .lfttbl .td1, .td2{      display:table-row;      border-bottom: solid 1px #2b9ed5 !important;  }    .td1 {    display: block;    background: #f00;  }
<table class="out">      <tr><td>          <table class="outtbl">          <tr>          <td>              <table class="lfttbl">                  <tr>                      <td class= td1>                         <p> hihi hii</p>                      </td>                    <td class= td2>                          <table class = rttbl"">                                                        </table>                      </td>                  </tr>              </table>          </td>      </tr>  </table>


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -