이미지 div와 텍스트 아래에 1 div를 만들고 그 옆에 다른 div를 만들려고합니다. 나중에 반응이 필요합니다.두 div를 이미지 + 텍스트와 나란히 놓기
어떤 이유로 50 % 너비로 만들면 스택이 만들어 집니까? 나는 그들을 49.7 %로 끌어 올려야하는데, 여분의 패딩이 어디에서 왔는지는 모른다. 여기
는 바로 지금입니다 내용은 다음과 같습니다HTML :
<div class="center">
<div class="home2">
<div class="home2_first">
<img src="Images/home_pic1.png" />
<p>Lorem Ipsum is simply dummy text!</p>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s</p>
</div>
</div>
<div class="home2">
<div class="home2_second">
<img src="Images/home_pic2.png" />
<p>Lorem Ipsum is simply dummy text!</p>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s</p>
</div>
</div>
</div>
CSS :
.home2 {
margin: 0 auto;
width: 49.7%;
text-align: center;
display: inline-block;
background-color: red;
height: 400px;
}
.home2 p {
font-family: 'cabinRegular', arial, sans-serif, verdana;
color: #000000;
font-size: 18px;
}
.center {
margin: 0 auto;
width: 100%;
background-color: blue;
}
.home2_first img {
margin: 0 auto;
padding: 0;
}
.home2_second img {
margin: 0 auto;
padding: 0;
}
https://jsfiddle.net/Lq5vLdrm/7/
그게 정확히 내가 필요로하는 것입니다, 나는 잘못된 스타일에 부유물을 추가하고있었습니다. –