C
C
Cheizer2018-06-05 16:52:36
css
Cheizer, 2018-06-05 16:52:36

How to remove the border in css if one of the blocks is missing?

Friends, tell me the solution please, it seems like an elementary task, but I can not figure out how to solve it.
There is a block container, in which there are two more blocks, the first block to separate its content from the second, has this style

.wrapper span:first-child {
    border-right: 1px #e4e4e4 solid;
}

But if the second block has no content, it disappears, and one block remains, and the task is how to remove the BORDER from it?
Here is a screenshot, the central container does not have a second block, and the border remains. How to remove it in CSS?
5b16947865508035383728.jpeg
Here raised https://codepen.io/Cheizer/pen/PaNXXR

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Lysenko, 2018-06-05
@Cheizer

.flex-container span:nth-child(even){
  border-left:1px #cc0000 solid;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question