table에 미디어 쿼리가 안 먹는 것 같습니다

table에 미디어 쿼리가 안 먹는 것 같습니다

QA

table에 미디어 쿼리가 안 먹는 것 같습니다

본문

@media (max-width:700px){
    .table01{width: 100%}
    .table01 td:first-child{width: 20%}
    .table01 td:nth-child(2n){width: 60%}

이렇게 하는데 td에는 먹는데 table에는 안먹습니다 조언 부탁드려요!

 


<table class="table01" width="<?php echo $width ?>" border=0 cellpadding="0" cellspacing="0">
  <tr>
       <td width="20%" class="fg_title"> </td>
       <td width="60%" height="30" align="center">
        <table class="table02" border="0" cellspacing="5" cellpadding="0">
        <tr>
            <td>
            <form name="form1" style="display:inline">
                <select name="formselect1" size="1" OnChange="namosw_goto_byselect(this, 'self')" style="height:24px">
                    <option value="#">년도별검색</option>
                    <?php
                    $year_plus = $year+5 ;    
                    for( $i=$year-4 ; $i<$year_plus ; $i++ ){
                        echo "<option value=".G5_BBS_URL."/board.php?bo_table=$bo_table&year=".$i."&month=".$month.">".$i."</option>";
                    }
                    ?>
                </select>
            </form>
            </td>
            <td><a href="<?php echo $_SERVER[PHP_SELF]."?bo_table=".$bo_table."&"; ?><?php if ($month == 1) { $year_pre=$year-1; $month_pre=$month; } else {$year_pre=$year-1; $month_pre=$month;} echo ("year=$year_pre&month=$month_pre&sc_no=$sc_no");?>"><img src="<?php echo $board_skin_url ?>/img/y_prev.gif" border="0" alt="<?php echo $year_pre ?>년"></a></td>
            <td><a href="<?php echo $_SERVER[PHP_SELF]."?bo_table=".$bo_table."&"; ?><?php if ($month == 1) { $year_pre=$year-1; $month_pre=12; } else {$year_pre=$year; $month_pre=$month-1;} echo ("year=$year_pre&month=$month_pre&sc_no=$sc_no");?>"><img src="<?php echo $board_skin_url ?>/img/m_prev.gif" border="0" alt="<?php echo $month_pre ?>월"></a></td>
            <td style="padding:0 10px;font-size:18px;font-weight:bold;"><a href="<?php echo $_SERVER[PHP_SELF]."?bo_table=".$bo_table; ?>" title="오늘로" onfocus="this.blur()"><?php echo $year ?>년 <?php echo $month ?>월</a></td>
            <td><a href="<?php echo $_SERVER[PHP_SELF]."?bo_table=".$bo_table."&"; ?><?php if ($month == 12) { $year_pre=$year+1; $month_pre=1; } else {$year_pre=$year; $month_pre=$month+1;} echo ("year=$year_pre&month=$month_pre&sc_no=$sc_no");?>"><img src="<?php echo $board_skin_url ?>/img/m_next.gif" border="0" alt="<?php echo $month_pre ?>월"></a></td>
            <td><a href="<?php echo $_SERVER[PHP_SELF]."?bo_table=".$bo_table."&"; ?><?php if ($month == 12) { $year_pre=$year+1; $month_pre=$month; } else {$year_pre=$year+1; $month_pre=$month;} echo ("year=$year_pre&month=$month_pre&sc_no=$sc_no");?>"><img src="<?php echo $board_skin_url ?>/img/y_next.gif" border="0" alt="<?php echo $year_pre ?>년"></a></td>
            <td>
            <form name="form1" style="display:inline">
                <select name="formselect1" size="1" OnChange="namosw_goto_byselect(this, 'self')" style="height:24px">
                    <option value="#">월별검색</option>
                    <?php
                    $year_plus = $year+5 ;    
                    for( $i=1 ; $i<13 ; $i++ ){
                        echo "<option value=".G5_BBS_URL."/board.php?bo_table=$bo_table&year=".$year."&month=".$i.">".$i."</option>";
                    }
                    ?>
                </select>
            </form>
            </td>
        </tr>
        </table>            
    </td>
    <td width="20%" align="right">
        <?php if ($rss_href || $write_href) { ?>
        <ul class="btn_bo_user">
            <?php if ($rss_href) { ?><li><a href="<?php echo $rss_href ?>" class="btn_b01 btn"><i class="fa fa-rss" aria-hidden="true"></i> RSS</a></li><?php } ?>
            <?php if ($admin_href) { ?><li><a href="<?php echo $admin_href ?>" class="btn_admin btn"><i class="fa fa-user-circle" aria-hidden="true"></i> 관리자</a></li><?php } ?>
            <?php if ($write_href) { ?><li><a href="<?php echo $write_href ?>" class="btn_b02 btn"><i class="fa fa-pencil" aria-hidden="true"></i> 업무현황등록</a></li><?php } ?>
        </ul>
        <?php } ?>
</td>
  </tr>
</table>

이 질문에 댓글 쓰기 :

답변 2

 width="<?php echo $width ?>"  이부분을 제거해 보세요 게시판관리자에서 설정된 넓이가 적용되는 부분입니다.


@media (max-width:700px){
    .table01{width: 100% !important;}
    .table01 td:first-child{width: 20%}
    .table01 td:nth-child(2n){width: 60%
}

 

미디어쿼리가 안먹을 경우, 기본 인라인 스타일이 적용될 수 있습니다.

!important 옵션을 사용하여 우선적용을 해보세요.

답변을 작성하시기 전에 로그인 해주세요.
전체 123,304 | RSS
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT