S
S
sanns2015-10-24 14:13:49
css
sanns, 2015-10-24 14:13:49

How to remove padding when there is no content (drupal)?

Here is an example codepen.io/sanns/pen/YyaKVm . Paddings near the region. The problem is that when the content is removed through Drupal, the paddings will remain. Content can be 2-3 blocks.
up: The fact is that one of the blocks is contained on all pages. And the other - only on some. And so, if I padding the one that is on everyone, it looks good alone. But if you need to add another block to it on the page, then this padding is obtained between them, it interferes :(

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
archelon, 2015-10-24
@archelon

remove the padding from the region and assign it to the content

C
Cat Anton, 2015-10-25
@27cm

The problem is that when the content is removed through Drupal, the paddings will remain.

You can use the :empty pseudo- class .
Example: codepen.io/27cm/pen/EVEXmq
If there should be no margins between blocks, but only before and after a group of blocks, then it would be more correct to wrap all blocks in one tag, which should be indented.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question