Advertisement
Guest User

Untitled

a guest
Jan 17th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.89 KB | None | 0 0
  1. $menu .= '<table><thead><tr><th>Name</th><th>Description</th><th>Price</th></tr></thead>';
  2. while ( have_rows('sections_items') ) : the_row();
  3. // Your loop code
  4. $menu .= '<tr><td>'.get_sub_field('dish_names').'</td><td>'.get_sub_field('dish_description').'</td><td>$ '.get_sub_field('dish_price').'</td></tr>';
  5. endwhile;
  6. $menu .= '</table> '
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13. table {
  14. border: 1px solid #ccc;
  15. border-collapse: collapse;
  16. margin: 0;
  17. padding: 0;
  18. width: 100%;
  19. table-layout: fixed;
  20. }
  21. table caption {
  22. font-size: 1.5em;
  23. margin: .5em 0 .75em;
  24. }
  25. table tr {
  26. background: #f8f8f8;
  27. border: 1px solid #ddd;
  28. padding: .35em;
  29. }
  30. table th,
  31. table td {
  32. padding: .625em;
  33. text-align: center;
  34. }
  35. table th {
  36. font-size: .85em;
  37. letter-spacing: .1em;
  38. text-transform: uppercase;
  39. }
  40. @media screen and (max-width: 600px) {
  41. table {
  42. border: 0;
  43. }
  44. table caption {
  45. font-size: 1.3em;
  46. }
  47. table thead {
  48. border: none;
  49. clip: rect(0 0 0 0);
  50. height: 1px;
  51. margin: -1px;
  52. overflow: hidden;
  53. padding: 0;
  54. position: absolute;
  55. width: 1px;
  56. }
  57. table tr {
  58. border-bottom: 3px solid #ddd;
  59. display: block;
  60. margin-bottom: .625em;
  61. }
  62. table td {
  63. border-bottom: 1px solid #ddd;
  64. display: block;
  65. font-size: .8em;
  66. text-align: right;
  67. }
  68. table td:before {
  69. /*
  70. * aria-label has no advantage, it won't be read inside a table
  71. content: attr(aria-label);
  72. */
  73. content: attr(data-label);
  74. float: left;
  75. font-weight: bold;
  76. text-transform: uppercase;
  77. }
  78. table td:last-child {
  79. border-bottom: 0;
  80. }
  81. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement