How to add a background to “wp_block”?

Posted in: Newspaper
Post count: 18

Block

How can I style the “wp_block” to look like position 2 in the image? For example, to have the image and text on a gray background plus 5px padding?

“wp_block” currently has the following code:

<!– wp:media-text {“mediaId”:10189,”mediaLink”:”https://b……&#8230;../”,”linkDestination”:”custom”,”mediaType”:”image”} –>
<div class=”wp-block-media-text is-stacked-on-mobile”><figure class=”wp-block-media-text__media”>Liść laurowy</figure><div class=”wp-block-media-text__content”><!– wp:heading {“level”:3} –>
<h3 class=”wp-block-heading”>Liście laurowe – właściwości, zastosowanie, przeciwwskazania</h3>
<!– /wp:heading –>

<!– wp:paragraph –>
<p>Nadają potrawom delikatny, korzenny smak i są często wykorzystywane do aromatyzowania zup, sosów, mięsa, ryb, marynat, a także przy konserwowaniu warzyw i ogórków kiszonych.</p>
<!– /wp:paragraph –></div></div>
<!– /wp:media-text →

Post count: 27744

Hello,

You can set a background color here -> https://i.imgur.com/BE0uCKB.png -> https://i.imgur.com/b9P5zX8.png

Thank you!

Post count: 18

Thank you very much for your answer, but I do not add it using the “icon box” but as “synchronized patterns”.
grafika

Post count: 27744

Hello,

Please provide more details about what you want to achieve to be able to help you.

Thank you!

Post count: 18

Image 1
Image 1
Image 2
Image 2
Image 3
Image 3
would like the image and text to have a frame of, for example, 5px – as in image number 4.
Image 4
Image 4

🙂

Post count: 27744

Hello,

Unfortunately, the theme doesn’t have control over this block.
You need to use a custom code css .tagdiv-type figure img
{
padding: 25px;
}

Set the code in Newspaper -> Theme panel -> Custom code -> Custom CSS.

Thank you!

Post count: 18

Thank you very much. This is what I ment!

Viewing 7 posts - 1 through 7 (of 7 total)
The forum ‘Newspaper’ is closed to new topics and replies.