E
E
EvilHero2018-03-22 16:49:52
css
EvilHero, 2018-03-22 16:49:52

How to change the width/height depending on the number of columns?

I'm making a WordPress site and I'm wondering how to implement the following.
I can pin posts in the header, the width of each post is 33.333333%, regardless of how much is fixed, but I need the width to change. For example:
Pinned 1 post - 100%
Pinned 2 posts - each will be 50% wide.
3 posts are pinned - each will be 33.3% wide.
Etc.
How can this be done and is it possible at all? Maybe someone faced this? I would be grateful for advice because I rummaged through Google, but did not find anything for vp.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya Pavlov, 2018-03-22
@EvilHero

html5.by/blog/flexbox

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question