모바일 사이즈 조절 하고 싶어요
본문
<div class="" style="width: 50%; float: left;;overflow: auto;background: #ffffff; ">
<div id="changeNowListBox">
<div class="NowListBoxYear"><?= date("Y년"); ?><div class="more_"><a href="/bbs/board.php?bo_table=0403<?= $options["mobile"] ? "&mode=week" : "" ?>"> + </a></div></div>
<div class="NowListBoxMonthDay"><?= date("m월 d일")?> <?php $yoil_text_set = array("일요일","월요일","화요일","수요일","목요일","금요일","토요일"); $yoil = $yoil_text_set[date('w', strtotime(date("Y-m-d")))]; echo $yoil; ?></div>
<?php
$myListSql = "select * from ".$g5['write_prefix'].$bo_table." where left(wr_1,8) <= '".$year.$sel_mon[i].sprintf("%02d",$mday)."' and left(wr_2,8) >= '".$year.$sel_mon[i].sprintf("%02d",$mday)."' order by wr_id asc";
$myListRes = sql_query($myListSql);
?>
<td colspan="2" style="" align="left"><br><strong>오늘은 일정이 없습니다.</strong></td>
<ul class="NowListUl">
<?php while($row = sql_fetch_array($myListRes)) :
switch ($row["wr_9"])
{
case "background:rgb(243,80,85)":
$tmpName = "[이천IL]";
break;
case "background:rgb(131,183,48);":
$tmpName = "[서비스지원국]";
break;
case "background:rgb(249, 188, 35);":
$tmpName = "[여성장애인교육팀]";
break;
case "background:rgb(66,174,220);":
$tmpName = "[체험홈]";
break;
case "background:rgb(128, 65, 217);":
$tmpName = "[주간활동]";
break;
case "background:rgb(1, 0, 225);":
$tmpName = "[방과후활동]";
break;
}
?>
<li>
<div style="display: inline;"><?= $tmpName ?><?= $row["wr_subject"] ?></div>
</li>
<?php endwhile ?>
</ul>
</div>
</div>
<div class="" style="width: 50%; float: left;;overflow: auto;background: #ffffff; ">
여기 코드에서 pc에서는 50%; 모바일에서는 width: 100%; 따로 주고 싶은데 어떻게 해야하나요?
!-->답변 1
<div class="" style="width: 50%; float: left;;overflow: auto;background: #ffffff; ">
<div class="" style="width: <?php echo G5_IS_MOBILE ? 100 : 50 ?>%; float: left;;overflow: auto;background: #ffffff; ">
답변을 작성하시기 전에 로그인 해주세요.