Center an HTML block in Gutenberg
-
Hi, I had html code, so I picked the html block. It is html for a banner with a link. Once it the code is added in the block I click preview and it shows fine. The problem is, I cannot center it since it is not a paragraph block. In paragraph mode, there is left, center, and right align. That doesn’t exist for the html block. Prior to Gutenberg, I could highlight the banner and use the paragraph center heading to center it. Now since there are two types of blocks and they are not connected, I cannot. I suppose I could figure out how to write html code to center it, but it would be easier if I could just do it the way it is done in paragraph style. Thanks for any help.
-
Hi, could you send the code you’re using? Use the code tag here.
Also, could you send a link to the site you’re having trouble with?
Please note these forums are for the sites hosted and managed here at WordPress.com. For help with a site hosted somewhere else, you’ll need to use the forums for self-managed WordPress installations instead.
-
Hi, well, I did a search and came to this forum. I did not know it was for sites hosted at WP. Mine is hosted elsewhere. So, do you still want the code in that case? And site link? Is there a url to the forum I should go to? Thanks.
-
No worries, it can get confusing.
You’ll want to use this forum:
https://wordpress.org/support/forums/Do include the code and link there. Good luck!
-
A quick couple of points below.
If your site is a WordPress site but hosted somewhere else besides here at WordPress.com, you can swing over to the WordPress(.org) forums and post your question, and get some help.
https://wordpress.org/support/forums/
If you’re not sure, pass us a link to your site so we can take a look with you. :)
Another option is to reach out to the source where you originally got the code for the banner and link from and ask if they can help you modify the HTML to center the image wherever it’s applied.
-
-
I’ll just let you know that I went to the site today, had the time, and could not find a place to post. I noticed someone else went around the same circles I did and was stuck and could not figure out how to post. They journaled the same journey I went on.
So I will leave the banner as it is, which is left aligned, or figure out how to center it myself with html by going to a training site on html.
Thanks for your help.
- The topic ‘Center an HTML block in Gutenberg’ is closed to new replies.