Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Div Based Table Example, highly configurable

Asked Modified Viewed 2,355 times
F
Falk
F
Falk 131
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Started this discussions
  • Answered 11 questions
asked
Super Admin

It has some styled labels as well, dropped these out of the project but figured I would share before they poof to cyber space.

The html
echo "<div class='table'>
    <div class='trHeadings'>
       <div class='HeadtdColumn1'>
            Title 1
        </div>
        <div class='HeadtdColumn2'>
         Title 2
        </div>
        <div class='HeadtdColumn3'>
         Title 3
        </div>
        <div class='HeadtdColumn4'>
         Title 4
        </div>
        <div class='HeadtdColumn5'>
         Title 5
        </div>
        <div class='HeadtdColumn6'>
         Title 6
        </div>
   </div>
</div>";

echo "<div class='table'>
         <div class='tr'>
            <div class='tdColumn1'></div>
            <div class='tdColumn2'></div>
            <div class='tdColumn3'></div>
            <div class='tdColumn4'></div>
            <div class='tdColumn5'></div>
            <div class='tdColumn6'></div>
         </div>
      </div>";


The CSS

/* Div Based Table styles */   
.table {
    margin-bottom: 0px; !important;
}

div.table {
    display: table;
}

div.trHeadings {
    display: table-row;
}


div.tr {
    display: table-row;
}

div.HeadtdColumn1, div.HeadtdColumn2, div.HeadtdColumn3, div.HeadtdColumn4, div.HeadtdColumn5, div.HeadtdColumn6 {
    display: table-cell;
    padding: 6px;
    vertical-align: middle;
    border-bottom: 2px solid #fefefe;
}

div.HeadtdColumn1 {
   text-align: center;
   width: 15%;
}
div.HeadtdColumn2 {
    width: 10%;
   text-align: left;
}
div.HeadtdColumn3 {
    width: 20%;
   text-align: center;
}
div.HeadtdColumn4 {
    width: 25%;
   text-align: center;
}
div.HeadtdColumn5 {
    width: 15%;
   text-align: center;
}
div.HeadtdColumn6 {
   width: 15%;
   text-align: center;
}


div.tdColumn1, div.tdColumn2, div.tdColumn3, div.tdColumn4, div.tdColumn5, div.tdColumn6 {
    display: table-cell;
    padding: 6px;
    vertical-align: middle;
}

div.tdColumn1 {
   text-align: center;
   width: 15%;
}
div.tdColumn2 {
    width: 10%;
   text-align: left;
}
div.tdColumn3 {
    width: 20%;
      text-align: center;
}
div.tdColumn4 {
    width: 25%;
      text-align: center;
}
div.tdColumn5 {
    width: 20%;
      text-align: center;
}
div.tdColumn6 {
    width: 15%;
      text-align: center;
}


div.table-list > div.trHeadings {
    background-color: #E6ECEF;
    color: #333;
    font-size: 14px;
}

div.table-list {
    margin-top: 0 !important;
    margin-bottom: 2px !important;
}

div.table-list > div.tr:hover  {
   background-color: #ecf7ff;
    cursor: pointer;
    cursor: hand;
}

div[class^='tdColumn'], div[class*=' tdColumn'] {
    font-size: 13px;
}
   
div.table-list > div[class^='tdColumn'], div[class*=' tdColumn'] {
    padding: 5px 10px;
    vertical-align: middle;
}

div.tdColumn6 label {
    font-size: 15px;
    font-weight: 100;
    margin: -3px 20px 0 5px;
    vertical-align: top;
    text-transform: uppercase;
    cursor: pointer;
   font-family: "proxima_nova", Arial !important;
    color: #1e202c;
}

div.tdColumn6 input[type="checkbox"] {
    -webkit-appearance: none;
    background: #fff;
    height: 14px;
    width: 14px;
    margin: 0;
    border: 1px solid #cacaca;
    outline: none;
    position: relative;
}

div.tdColumn6 input[type="checkbox"]:checked {
    background-color: #4a921b;
    border: 1px solid #4a921b;
    color: #fff;
}

div.tdColumn6 input[type="checkbox"]:checked:after {
    content: '\2714';
    font-size: 10px;
    position: absolute;
    top: 0px;
    left: 1px;
    color: #fff;
    font-family: "Times New Roman", Times, serif;
}

div.tdColumn5 label {
    font-size: 15px;
    font-weight: 100;
    margin: -3px 20px 0 5px;
    vertical-align: top;
    text-transform: uppercase;
    cursor: pointer;
   font-family: "proxima_nova", Arial !important;
    color: #1e202c;
}

div.tdColumn5 input[type="checkbox"] {
    -webkit-appearance: none;
    background: #fff;
    height: 14px;
    width: 14px;
    margin: 0;
    border: 1px solid #cacaca;
    outline: none;
    position: relative;
}

div.tdColumn5 input[type="checkbox"]:checked {
    background-color: #4a921b;
    border: 1px solid #4a921b;
    color: #fff;
}

div.tdColumn5 input[type="checkbox"]:checked:after {
    content: '\2714';
    font-size: 10px;
    position: absolute;
    top: 0px;
    left: 1px;
    color: #fff;
    font-family: "Times New Roman", Times, serif;
}
0 replies
There are no post found.

Labels

None yet

Statistics

  • Views 0 views
  • Posts 0 posts
  • Votes 0 votes
  • Topic users 1 member

1 participant

F
F
Falk 131
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Started this discussions
  • Answered 11 questions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet