0

I have a block with a visual menu in it and I want to show up centered on the page. This is my css within the block:

.container{
margin: 0 auto;
text-align:center;
}

I've also tried to put the widget when inserted into the page inside a centered div:

<div style="text-align: center;" >
{{widget type="Magento\Cms\Block\Widget\Block" template="widget/static_block/default.phtml" block_id="38" type_name="CMS Static Block"}}
</div>

What else can I do to center it?

0

What about if you create a new template file

template="widget/static_block/whatever.phtml

And put markup to center content within this. Obviously depends on the content of template file as to whether this works

  • I'm not sure how to do that, could you put a link to instructions for this? Thanks – Morgan Smith May 24 '19 at 15:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.