mondaySpecial의 텍스트가 두 번째 줄로 이동하면 tuesdaySpecial-saturdaySpecial이 페이지 아래쪽으로 밀려 div의 서식이 엉망이됩니다. 같은 일이 다른 스페셜 중 하나에서 발생합니다. 그 아래의 스페셜은 아래로 밀려납니다. 이 문제를 어떻게 방지 할 수 있습니까?Div 텍스트가 다른 div를 밀어 내림
<div id="specials"> <img src="SleepingMoonImages/menuSpecials.png" width="360" height="839" alt=""/> <div id="menuSpecials">
<div id="weeklySpecialsLabel">Weekly Specials </div>
<div id="redUnderline1"></div>
<div id="weeklySpecialsDays">
<div id="mondayLabel">Monday</div>
<div id="tuesdayLabel">Tuesday</div>
<div id="wednesdayLabel">Wednesday</div>
<div id="thursdayLabel">Thursday</div>
<div id="fridayLabel">Friday</div>
<div id="saturdayLabel">Saturday</div>
</div>
<div class="specialsFormat" id="mondaySpecial">Monday Special Goes Here df dsaf fds f sfd</div>
<div class="specialsFormat" id="tuesdaySpecial">Tuesday Special Goes Here</div>
<div class="specialsFormat" id="wednesdaySpecial">Wednesday Special Goes Here</div>
<div class="specialsFormat" id="thursdaySpecial">Thursday Special Goes Here</div>
<div class="specialsFormat" id="fridaySpecial">Friday Special Goes Here</div>
<div class="specialsFormat" id="saturdaySpecial">Saturday Special Goes Here</div>
</div> </div>
CSS 당신이 여기에서 보는 레이아웃하지만 당신을 따라하는 데 도움이되는 몇 가지 마크 업 방법을
.specialsFormat
{
float: left;
margin-right: 10px;
}
#mondaySpecial{
width:300px;
margin-left:auto;
margin-right:auto;
position:relative;
bottom:644px;
left:41px;
font-size:12px;
}
#tuesdaySpecial{
width:300px;
margin-left:auto;
margin-right:auto;
position:relative;
bottom:557px;
left:41px;
font-size:12px;
}
#wednesdaySpecial{
width:300px;
margin-left:auto;
margin-right:auto;
position:relative;
bottom:490px;
left:41px;
font-size:12px;
}
#thursdaySpecial{
width:300px;
margin-left:auto;
margin-right:auto;
position:relative;
bottom:405px;
left:41px;
font-size:12px;
}
#fridaySpecial{
width:300px;
margin-left:auto;
margin-right:auto;
position:relative;
bottom:317px;
left:41px;
font-size:12px;
}
#saturdaySpecial{
width:300px;
margin-left:auto;
margin-right:auto;
position:relative;
bottom:227px;
left:41px;
font-size:12px;
}
많은 의미가 있습니다. 나는 그런 생각을하지 않았다. 감사! – user6680