1. Thẻ Css :
<style>
.left {
float: left;
width: 70%;
}
.right {
float: right;
width: 30%;
}
.group:after {
content:"";
display: table;
clear: both;
}
img {
max-width: 100%;
height: auto;
}
@media screen and (max-width: 480px) {
.left,
.right {
float: none;
width: auto;
}
}
</style>
2. Thẻ Div :
<div class="group">
<div class="left">
<p>Nội dung cột trái </p>
</div>
<div class="right"><img src="https://lh4.googleusercontent.com/-YVuwVEzwxZ0/WC1h1uagnII/AAAAAAAABjU/7wKVGDDe19se1Mu9yRsGfvLuqCQM0GdmwCLcB/s1600/Sangocaosu1.jpg" alt="Sàn gỗ tự nhiên" /><br/>
Sàn gỗ tự nhiên - gỗ cao su - giá Chỉ 460.000đ/m2 Liên hệ : 0968.970.650
</div>
</div>
Mẫu thẻ div chia 2 cột tùy chỉnh độ rộng phù hợp xem trên điện thoại
23:51
0