Without Media Queries How to Achieve 3 Column Desktop to 1 Column Mobile Layout

CSS Grid single column layout for mobile without media queries

No you must use media query

.grid-container {
display: grid;
grid-template-columns: 1fr;
grid-template-areas: "one" "two" "three" "four";
}

How to make 3 column CSS grid change into 1 column on mobiles with media query

@media only screen and (max-width: 768px) {  .history {    display: grid;    grid-template-columns: 1fr;    padding: 1em;    grid-row-gap: 100px;  }}

How to achieve 2 equal columns on desktop and 1 column on mobile with css grid

if you are go to full page it will give you two column..

check it.. maybe you are looking for this ..

.container{
display: grid;
grid-gap:20px;
grid-template-columns: repeat(auto-fit, minmax(500px , 1fr));

}
<div class="container">
<div class="child">It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).</div>
<div class="child">It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).</div>
</div>


Related Topics



Leave a reply



Submit