Support » Theme: Jinsy Magazine » How can I keep a common background across multiple blocks?

  • Resolved zer0sn0t

    (@zer0sn0t)


    As an example, check out this page: https://wordpress.org/support/theme/jinsy-magazine/

    Just above the form for creating a new topic there is a section with a yellow background. All the text inside this appear to have a common “light yellow background”.

    Similiarily, I would like to have a common background color across multiple widgets. Or some kind of border across multiple widgets.

    How can I achieve this?

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • To get same background for multiple block of texts, just do regular paragraph block and use <br>, it’s called soft return (line break), we can just hold shift key and hit enter. This will create a new blank line inside one paragraph, then use Block Settings to assign background color.

    Hitting enter without holding shift key is called hard return, and this will create another paragraph. If you want multiple paragraphs inside one block so that it could be assigned the same color, just select all the paragraph blocks and group them. This Group Block is a new feature in latest WP. This means, it works for theme that support it.

    You can also manually create that by using HTML, see example below.

    
    <div style="padding: 3em; background: yellow;">
    	<p>My 1st block of text goes here</p>
    	<p>My 2nd block of text goes here</p>
    	<p>My 3rd block of text goes here</p>
    </div>
    
    
    Thread Starter zer0sn0t

    (@zer0sn0t)

    @paulwp Thanks for responding! I see that we can enclose multiple paragraph blocks this way. But I need to use the following blocks:

    A Heading H2 block
    A paragraph (containing the main body) block
    A short code block
    A short code block

    Any idea how this can be achieved? Sorry, I think I should have included this in my original question.

    You can just make use of Group Block. Create each block separately then select them and group them, then you can style these blocks having the same background.

    But if you want to do it manually, it would look something like this, in HTML mode.

    
    <div style="padding: 3em; background: yellow; ">
    	<h2>Heading goes here</h2>
    	<p>paragraph is here</p>
    	[shortcode1]
    	[shortcode2]
    </div>
    
    
    Thread Starter zer0sn0t

    (@zer0sn0t)

    @paulwp I updated wordpress to the latest version and tried your solution. It worked fine! Thanks for helping me out with this! 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How can I keep a common background across multiple blocks?’ is closed to new replies.