AD

Responsive layout format




--------------------------------------------------------------

w3school layout format:

====================================


@media only screen and (min-width: 600px) {

  /* For tablets: */

  

}


@media only screen and (min-width: 768px) {

  /* For desktop: */

  

}


============================


/* Extra small devices (phones, 600px and down) */

@media only screen and (max-width: 600px) {...}


/* Small devices (portrait tablets and large phones, 600px and up) */

@media only screen and (min-width: 600px) {...}


/* Medium devices (landscape tablets, 768px and up) */

@media only screen and (min-width: 768px) {...}


/* Large devices (laptops/desktops, 992px and up) */

@media only screen and (min-width: 992px) {...}


/* Extra large devices (large laptops and desktops, 1200px and up) */

@media only screen and (min-width: 1200px) {…}


====================================

   ChatGpt layout format:

========================

/* Default styles */

.container {

  width: 100%;

  max-width: 1200px;

  margin: 0 auto;

  padding: 20px;

  box-sizing: border-box;

}


/* Tablet layout */

@media (max-width: 1024px) {

  .container {

    padding: 15px;

  }

}


/* Mobile layout */

@media (max-width: 768px) {

  .container {

    padding: 10px;

  }

}


/* Mobile landscape layout */

@media (max-width: 480px) and (orientation: landscape) {

  .container {

    padding: 5px;

  }

}


/* Mobile portrait layout */

@media (max-width: 320px) and (orientation: portrait) {

  .container {

    padding: 5px;

  }

}



/* ৭৬৬ থেকে ১০০০ পিক্সেলের মধ্যের জন্য সাম্প্রতিক স্টাইল */

@media (min-width: 766px) and (max-width: 1000px) {

  .container {

    width: 90%;

    margin: 0 auto;

    /* আপনার ইচ্ছামত স্টাইল যোগ করুন */

  }

}


/* ১০০০ পিক্সেলের বেশি স্ক্রিনের জন্য সাম্প্রতিক স্টাইল */

@media (min-width: 1001px) {

  .container {

    width: 1000px;

    margin: 0 auto;

    /* আপনার ইচ্ছামত স্টাইল যোগ করুন */

  }

}

==================================

Bootstrap grid system has four classes:


  • xs (for phones - screens less than 768px wide)
  • sm (for tablets - screens equal to or greater than 768px wide)
  • md (for small laptops - screens equal to or greater than 992px wide)
  • lg (for laptops and desktops - screens equal to or greater than 1200px wide)

The classes above can be combined to create more dynamic and flexible layouts.


Post a Comment

Previous Post Next Post