테이블에 대해 아래에 언급 된 코드를 시도했지만 응답하지 않습니다. 누구든지이 코드를 수정하여 반응 형으로 만들 수 있습니까?CSS에서 반응 형 테이블을 만드는 방법
.content table {
border-collapse:collapse;
margin:0 0 1.625em;
width:100%;
font-size:90%
}
.content table h3 {
font-size:1em;
font-weight:300
}
.content tbody {
border-bottom:1px solid #444;
border-left:1px solid #444
}
.content tr:nth-child(odd) {
background-color:#eee
}
.content table th {
background-color:#0078d7;
color:#fff;
font-size:.85em
}
.content td,.content th {
vertical-align:top
}
.content th,.content td {
padding:3px 10px;
text-align:left;
border-top:1px solid #444;
border-right:1px solid #444
}
HTML
$menu .= '<table class="content"><thead><tr><th>Name</th><th>Description</th><th>Price</th></tr></thead>';
while (have_rows('sections_items')) : the_row();
// Your loop code
$menu .= '<tr><td>'.get_sub_field('dish_names').'</td><td>'.get_sub_field('dish_description').'</td><td>$ '.get_sub_field('dish_price').'</td></tr>';
endwhile;
$menu .= '</table> ';
후 HTML 코드 – mlegg
이 테이블을 표시하지만 반응은 "반응"말할 때 어떻게 당신이 찾고있는 것을 – raja
@raja. 원본 질문에 "렌더링 된"html을 게시 할 수 있습니까? – happymacarts