DEV Community

CSS and media queries

Andrei Navumau on November 24, 2017

Strategy to add additional breakpoints to responsive CSS I'm studying CSS, so I'm sure that those who are experienced front-end developers will ...
Collapse
 
arccosine profile image
ArcCosine

If you already knew it, I'm sorry, is not it easy to use calc?

See, developer.mozilla.org/en-US/docs/W...

For example in this case,

padding-right : calc( 100%/4 - 255px/4 );

I'm glad if you can use it as a reference

Collapse
 
tyzia profile image
Andrei Navumau

That's amazing! Thank you, ArcCosine! I didn't know about calc() in css. It does exactly, what I need.

Collapse
 
tnbmorais profile image
tnbmorais

I don't know if it fits for you but you could do this in a simpler way, by using flex.

Here's an example: jsbin.com/defamihada/edit?html,css...

Also you can check a guide for flexbox: css-tricks.com/snippets/css/a-guid...

Collapse
 
tyzia profile image
Andrei Navumau

Thank you, tnbmorais. Flex is a wonderful technology, which simplifies all my pain with positioning to absolute simplicity.