layout by flywheel css breakpoints responsive design how to feature animation of resizing web pages with css break points pop up purple

How to use CSS breakpoints to create responsive designs

Ananda Projapati's Layout avatar

The success of a website depends a lot on user experience. These days, users access a website from many different devices, and providing an equal user experience across each device can be a challenge. That’s where CSS breakpoints can come in handy.

CSS breakpoints can be highly beneficial for creating responsive sites that provide a great user experience on any device, but they also remain one of the more confusing aspects of web design, especially for new developers.

In this article, I will simplify how to use CSS breakpoints with a closer look at the following areas:

Let’s get started!


What is a CSS breakpoint?

CSS breakpoints are points where the website content responds according to the device width, allowing you to show the best possible layout to the user.

CSS breakpoints are also called media query breakpoints, as they are used with media query.

In this example, you can see how the layout adapts to the screen size. The layout at large resolution has a header and two column body layout but in small device it turns into one column layout.

layout by flywheel css breakpoints responsive design how to layout comparison graphic of laptop versus tablet

How to set CSS breakpoints

The tricky part is to decide the breakpoints themselves. There aren’t any standard templates, and different frameworks use different breakpoints.

So what approach should you adopt for your breakpoints?

There are two probable approaches to follow:

  • Breakpoints based on device
  • Breakpoints based on content

CSS breakpoints based on device

Deciding breakpoints based on different devices sounds like a good idea, but in reality, it’s not always the best approach. We already have enough devices to worry about, and when a new one comes out with a different width, going back to your CSS and adding a new breakpoint all over again is time-consuming.

Nonetheless, it’s still a viable option, as you may find that works okay for you. Here’s an example  of device-specific breakpoints:

[css]/* ----------- iPhone 6, 6S, 7 and 8 ----------- */

/* Portrait */

@media only screen

and (min-device-width: 375px)

and (max-device-width: 667px)

and (-webkit-min-device-pixel-ratio: 2)

and (orientation: portrait) {

}

/* Landscape */

@media only screen

and (min-device-width: 375px)

and (max-device-width: 667px)

and (-webkit-min-device-pixel-ratio: 2)

and (orientation: landscape) {

}

/* ----------- Google Pixel ----------- */

/* Portrait */

@media screen

and (device-width: 360px)

and (device-height: 640px)

and (-webkit-device-pixel-ratio: 3)

and (orientation: portrait) {

}

/* Landscape */

@media screen

and (device-width: 360px)

and (device-height: 640px)

and (-webkit-device-pixel-ratio: 3)

and (orientation: landscape) {

}[/css]

With this approach, you will end up having a huge list of media queries.


CSS breakpoints based on content

The ideal option for deciding breakpoints is based on the content of your site. This method allows you to simply add breakpoints where your content needs layout adjustment. This will make your media query a lot simpler and manageable.

This breakpoint means the CSS will apply when the device width is 768px and above.

[css]@media only screen (min-width: 768px){

...

}[/css]

You can also set a range with breakpoints,  so the CSS will only apply within those limits.

[css]@media only screen and (min-width: 768px) and (max-width: 959px){

...

}[/css]

When to use min or max-width CSS breakpoints

You can set your breakpoints in different ways using min-width, max-width, or even by combining both. But the question is, when should you use each one? 

To answer it in a simple way, if you are designing your layout with a mobile-first approach, then use min-width breakpoints and work your way up.

Set your default styles for the small device and just adjust for larger devices accordingly.

Likewise, if you are designing for larger devices first, then set your default CSS as you normally would and adjust for smaller devices with the max-width approach.


Using CSS breakpoints with SASS

If you are using a preprocessor like SASS or SCSS, you can write much smarter breakpoints. Mixin allows you to create more declarative breakpoints to remember, like this:

[css]@mixin tablet-up {

@media only screen (min-width: 768px) { @content; }

}[/css]

While working in a group, it’s much easier to remember “tablet-up” than 768px or 48em. Anyone can understand this breakpoint; it is for tablet and above screen sizes. 


Which CSS breakpoints to use

We’ve seen how to use breakpoints and when to use them, but the question still remains: what specific breakpoints should you use?

Let’s break things down a little. You need to target desktop, tablet, and mobile-only sizes. You can check some popular frameworks to get an idea of what approach to follow.

Bootstrap has breakpoints at 576px, 768px, 992px, and 1200px. Foundation mainly has breakpoints at 40em and 64em. At Bulma, breakpoints are set at 768px, 769px, 1024px, 1216px, and 1408px.

Each one has different breakpoints but one thing they have in common is a mobile-first approach. You can use one of these breakpoints as a starting point or you can come up with your own, like this:

[css]@media (min-width: 640px){

...

}

@media (min-width: 768px){

...

}

@media (min-width: 1024px){

...

}

@media (min-width: 1200px){

...

}[/css]

You get the idea!


Wrapping up

To sum up, CSS breakpoints are a great way to restructure your layout to provide the best user experience across different devices.

Always try to create breakpoints based on your own content, not devices. Break them to a logical width rather than a random width and keep them to a manageable number, so modifying remains simple and clear.

What CSS breakpoints do you use for your layouts? Do let us know in the comments section below.


What’s next?

Create and test your custom Gutenberg blocks with Local for free!

Learn more about Local here!


For more advice on building responsive sites, check out these articles!

Comments ( 14 )

  1. Jordanpeero

    March 28, 2025

    Luxury timepieces have long been a benchmark of excellence. Expertly made by legendary watchmakers, they seamlessly blend classic techniques with modern technology.
    All elements embody superior quality, from precision-engineered calibers to high-end elements.
    Owning a timepiece is not just about telling time. It represents refined taste and heritage craftsmanship.
    No matter if you love a minimalist aesthetic, Swiss watches provide extraordinary beauty that never goes out of style.
    http://elitecad.pl/forum/viewtopic.php?f=20&t=913&p=549720#p549720

  2. https://commealatele.com/question/pourquoi-choisir-un-courtier-immobilier-les-avantages-incontestables/

    March 27, 2025

    When I originally commented I clicked the "Notify me when new comments are added" checkbox and now each time a
    comment is added I get four e-mails with the same comment.
    Is there any way you can remove me from that service?
    Cheers! https://commealatele.com/question/pourquoi-choisir-un-courtier-immobilier-les-avantages-incontestables/

  3. FrankStamp

    March 27, 2025

    В наступающем году будут в тренде стильные палитры, натуральные фактуры и уникальный силуэт.
    Следует присмотреться сочных акцентов и интересных узоров.
    Гуру стиля советуют смело сочетать формами и уверенно внедрять новые тренды в свой образ.
    Минимализм по-прежнему актуальны, в то же время их можно дополнить интересными деталями.
    Поэтому ключ к стилю этого года — индивидуальность и грамотное сочетание классики с трендами.
    https://swaay.com/u/mail-3/about/

  4. Benito

    March 21, 2025

    I have been surfing online more than 4 hours today, yet I
    never found any interesting article like yours. It's pretty
    worth enough for me. In myy view, if all site owners andd bloggers made glod content as you did, the web will be a lot more useful than evsr before. https://Menbehealth.wordpress.com

  5. https://menbehealth.wordpress.com/

    March 19, 2025

    Thanks for a marvelou posting! I seriously enhoyed reading it, you're a great
    author. I will always bookark your blog and will eventually come back in the future.

    I want tto encourage one to continue your great work,
    have a nice day! https://menbehealth.wordpress.com/

  6. https://menbehealth.wordpress.com/

    March 19, 2025

    Thanks for a marvelous posting! I seriously enjlyed readingg it, you're a
    great author. I will allways bookmark yolur blog and
    will eventually come back in the future. I want to encourage one to continue your
    great work, have a nice day! https://menbehealth.wordpress.com/

  7. BenitoBuize

    March 19, 2025

    На данной платформе вы найдете центр психологического здоровья, которая обеспечивает профессиональную помощь для людей, страдающих от депрессии и других психических расстройств. Наша комплексное лечение для восстановления ментального здоровья. Врачи нашего центра готовы помочь вам справиться с трудности и вернуться к психологическому благополучию. Профессионализм наших психологов подтверждена множеством положительных рекомендаций. Запишитесь с нами уже сегодня, чтобы начать путь к оздоровлению.
    http://litbyv3.com/__media__/js/netsoltrademark.php?d=empathycenter.ru%2Fpreparations%2Fl%2Flamotridzhin%2F

  8. BenitoBuize

    March 19, 2025

    Здесь вы найдете центр психологического здоровья, которая предоставляет профессиональную помощь для людей, страдающих от депрессии и других ментальных расстройств. Мы предлагаем эффективные методы для восстановления ментального здоровья. Врачи нашего центра готовы помочь вам решить трудности и вернуться к психологическому благополучию. Квалификация наших специалистов подтверждена множеством положительных обратной связи. Свяжитесь с нами уже сегодня, чтобы начать путь к восстановлению.
    http://lilianascenna.com/__media__/js/netsoltrademark.php?d=empathycenter.ru%2Fpreparations%2Fl%2Flamotridzhin%2F

  9. BenitoBuize

    March 19, 2025

    На этом сайте вы найдете центр ментального здоровья, которая предоставляет профессиональную помощь для людей, страдающих от стресса и других психических расстройств. Эта комплексное лечение для восстановления ментального здоровья. Врачи нашего центра готовы помочь вам справиться с психологические барьеры и вернуться к сбалансированной жизни. Квалификация наших специалистов подтверждена множеством положительных обратной связи. Запишитесь с нами уже сегодня, чтобы начать путь к лучшей жизни.
    http://libertycharms.biz/__media__/js/netsoltrademark.php?d=empathycenter.ru%2Fpreparations%2Ff%2Ffenibut%2F

  10. BenitoBuize

    March 18, 2025

    На этом ресурсе вы найдете учреждение психологического здоровья, которая предлагает поддержку для людей, страдающих от депрессии и других психических расстройств. Наша комплексное лечение для восстановления ментального здоровья. Врачи нашего центра готовы помочь вам решить трудности и вернуться к гармонии. Опыт наших врачей подтверждена множеством положительных отзывов. Запишитесь с нами уже сегодня, чтобы начать путь к восстановлению.
    http://jcrnavigator.com/__media__/js/netsoltrademark.php?d=empathycenter.ru%2Fpreparations%2Fz%2Fzopiklon%2F

  11. https://Xeuser.Gajaga.work/index.php?mid=board&document_srl=975469

    March 17, 2025

    Hello everyone, it's my first pay a visit at this website,
    and post is genuinely fruitful for me, keep up posting such
    articles or reviews. https://Xeuser.Gajaga.work/index.php?mid=board&document_srl=975469

  12. https://Xeuser.Gajaga.work/index.php?mid=board&document_srl=975469

    March 17, 2025

    Hello everyone, it's my first pay a visit at this website, and post is genuinely fruitful for me, keep up posting such articles or reviews. https://Xeuser.Gajaga.work/index.php?mid=board&document_srl=975469

  13. Frankfeews

    March 5, 2025

    Центр "Эмпатия" оказывает комплексную помощь в области ментального здоровья.
    Здесь принимают опытные психологи и психотерапевты, которые помогут в сложных ситуациях.
    В "Эмпатии" используют эффективные методики терапии и индивидуальный подход.
    Центр помогает при депрессии, панических атаках и сложностях.
    Если вы нуждаетесь в безопасное место для решения личных вопросов, "Эмпатия" — верное решение.
    1bookmarking.com

  14. https://co2budget.nl/forums/users/cedrics269/

    February 25, 2025

    I'm really enjoying the design and layout of your site.
    It's a very easy on the eyes which makes it much more enjoyable for me
    to come here and visit more often. Did you hire out a developer to create your theme?
    Exceptional work! https://co2budget.nl/forums/users/cedrics269/

Join the discussion