سایت آموزشی فری لرن

300 x 150
x
 
<!DOCTYPE html>
<html>
<head>
<style>
.My-Container{
 background-color:#5db616;
 color:#fff;
 display: grid;
 grid-template-columns: auto auto auto auto;
 grid-gap: 20px 30px;
}
.MyItem{
 background-color:#f2f2f2;
 color:#000; 
 font-size:25px;
 margin:5px;
 padding:20px;
 text-align:center;
 border: 2px solid #000;
}
</style>
</head>
<body>
<div class="My-Container">
 <div class="MyItem">1</div>
 <div class="MyItem">2</div>
 <div class="MyItem">3</div>
 <div class="MyItem">4</div>
 <div class="MyItem">5</div>
 <div class="MyItem">6</div>
 <div class="MyItem">7</div>
 <div class="MyItem">8</div>
</div>
</body>
</html>
آدرس با موفقیت کپی شد