How to adjust the layout of Custom HTML Blocks?
-
Hello,
Amazon does provide affiliation HTML code like this for bloggers to promote their products:
<a href="https://www.amazon.fr/NEENCA-Genouill%C3%A8re-Professionnelle-Stabilisateurs-Genouill%C3%A8res/dp/B0B3M71W11?&linkCode=li3&tag=cadpr-21&linkId=b6b4d64164f621e28176525ddcf8fe73&language=fr_FR&ref_=as_li_ss_il" target="_blank"><img border="0" src="//ws-eu.amazon-adsystem.com/widgets/q?_encoding=UTF8&ASIN=B0B3M71W11&Format=_SL250_&ID=AsinImage&MarketPlace=FR&ServiceVersion=20070822&WS=1&tag=cadpr-21&language=fr_FR" ></a><img src="https://ir-fr.amazon-adsystem.com/e/ir?t=cadpr-21&language=fr_FR&l=li3&o=8&a=B0B3M71W11" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />
This is an actual code for you if you need to test.
When integrated into a Custom HTML Block, such a code generate a clickable image like this one.The issue is that the Custom HTML block does not enable any adjustment. As such I needed to add the following code to center-align the image:
<div style="text-align: center"></div>
I would also like to add some top and bottom margin.
How can I do this to avoid having to do it manually each time I add a new image to my blog posts?
Is there a way to create a button to replicate the align-center and top margin functions?Please note that I’m not a coder, but I find it weird that WordPress does not offer such features with a wisiwig one-click option. So what is my best option?
I assume your answer will be to create a CSS?
What should that CSS be then?Also, does it mean I will need to apply the class manually into each new Custom HTML Block?
- The topic ‘How to adjust the layout of Custom HTML Blocks?’ is closed to new replies.