- This topic has 9 replies, 2 voices, and was last updated 3 years, 3 months ago by
Fernando.
-
AuthorPosts
-
January 30, 2023 at 10:07 pm #2515011
jal-mj
Hello,
I want to customize a paragraph block.
Usually, I would apply the CSS class on the ADDITIONAL CSS CLASS(ES) (advanced area), and that’s all, but the problem is that I need some HTML code.
This is what I want to do:
So by now, to do so, I have done the HTML in the HTML block post and the CSS on an element page. But this is not good. I want to create a block template where I can insert it while doing the post and writing the paragraph.
It would be good too if I could apply CSS classes where the CSS and the HTML apply, but actually, I don’t know if that is possible.
Thank you for your time.
January 30, 2023 at 11:07 pm #2515070Fernando Customer Support
Hi Jal-mj,
You can do such a structure with GenerateBlocks plugin.
You just need to place the Featured text and the inner text through 2 different Headline Blocks, and place both on one Container Block.
Then add Borders to the Container Block.
Lastly, give the Featured text a negative top margin. If this doesn’t work, we can use custom CSS to position it.
January 30, 2023 at 11:16 pm #2515080jal-mj
Hello Fernando,
Could you be more specific?
I already have generate blocks plugin, but I don’t know how to apply this design in a block.
Could you be more specific in the process? Thank you.
January 30, 2023 at 11:22 pm #2515083Fernando Customer Support
Can you create a structure like this?: https://share.getcloudapp.com/bLuO2eYy
Afterward, provide the link to where we can see this, and I’ll check what CSS is needed.
January 30, 2023 at 11:43 pm #2515091jal-mj
You can find the URL in the private area.
It is at the bottom of the page. I have created the blocks with no problems, but they are not working correctly on different devices. Please check the size of the screen to see what I mean.
Under the block, there is the HTML code that I did before. That is the way that I want to work.
So maybe some css code is needed….
Thank you.
January 31, 2023 at 12:10 am #2515108Fernando Customer Support
Here’s a CSS you can try:
.gb-container.gb-container-ba10bc52 > .gb-inside-container { position: relative; } .gb-container.gb-container-ba10bc52 > .gb-inside-container .featured-word{ position: absolute; top:-20px; left: 16px; padding: 0 6px; }This CSS positions the Featured word similar to your HTML Block.
January 31, 2023 at 1:08 am #2515148jal-mj
Perfect Fernando, it works fine!
If I want to do more I have to change the .gb-container-ba10bc52 <– container number in CSS, isn’t it?
Thank you.
January 31, 2023 at 1:12 am #2515151Fernando Customer Support
Are you referring to changing stuff like the padding? If so, you can change that in the Block settings.
You can replace this with a Custom class as well:
gb-container-ba10bc52Adding Custom Classes: https://wordpress.com/support/wordpress-editor/adding-additional-css-classes-to-blocks/
January 31, 2023 at 1:23 am #2515158jal-mj
All is clear Fernando. Thank you for all.
January 31, 2023 at 1:28 am #2515163Fernando Customer Support
You’re welcome, Jal-mj!
-
AuthorPosts
- You must be logged in to reply to this topic.