Wednesday, 29 March 2017

Responsive Table First Row with all columns using CSS

/// CSS

<style type="text/css">
        .tblcssresponse
        {
            width: 100%;
        }
        .td1, .td3
        {
            width: 45%;
        }
        .td2
        {
            width: 10%;
        }
        @media all and (max-width:750px)
        {
            .tblcssresponse
            {
                width: 100%;
            }
            .td1, .td3
            {
                width: 100%;
            }
            .td2
            {
                width: 100%;
            }
           .tblcssresponse tr td
            {
                display: block;
                width: 100%;
            }
       
           .tblcssresponse tr
            {
                display: block;
                margin-bottom: 30px;
            }
        }

    </style>


/// HTML

<table class="tblcssresponse">
  
            <tr>
                <td class="td1">
                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                 <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 p-0 thumbnail">
                 column1
                 </div>
                </div>
                </td>
                <td class="td2">
                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 p-0 thumbnail">
                  column2
                  </div>
                </div>
                </td>
                <td class="td3">
                 <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 p-0 thumbnail">
                 
                 column3
                  </div>
                 </div>
                </td>
            </tr>
    

    </table>



/// REsult

before


After




No comments:

Post a Comment

How to highlight selected text in notepad++

  –> To highlight a block of code in Notepad++, please do the following steps step-1  :- Select the required text. step-2  :- Right click...