I have a Magento2.4
based site and I edited the default.xml
to load static cms block in the footer div and align them next to each other. My issue is one of the static blocks keeps appear outside the container element I am trying to set it to load inside of and I am not sure why.
Here is my default.xml
<body>
<!-- footer One -->
<block class="Magento\Cms\Block\Block" name="footer_first">
<arguments>
<argument name="block_id" xsi:type="string">footer_first</argument>
</arguments>
</block>
<move element="footer_first" destination="footer" before="-"/>
<!-- footer second -->
<block class="Magento\Cms\Block\Block" name="footer_second">
<arguments>
<argument name="block_id" xsi:type="string">footer_second</argument>
</arguments>
</block>
<move element="footer_second" destination="footer" after="footer_first"/>
<!-- footer third -->
<block class="Magento\Cms\Block\Block" name="footer_third">
<arguments>
<argument name="block_id" xsi:type="string">footer_third</argument>
</arguments>
</block>
<move element="footer_third" destination="footer" after="footer_second"/>
<!-- footer forth -->
<block class="Magento\Cms\Block\Block" name="footer_fourth">
<arguments>
<argument name="block_id" xsi:type="string">footer_fourth</argument>
</arguments>
</block>
<move element="footer_fourth" destination="footer" after="footer_third"/>
However, what's happening is the footer_fourth
is loading outside of the <div class="footer">
div while all the others are loading inside of it?
Here is the code from a view source of the page when I go to it in a browser
<footer class="page-footer"><div class="footer content"><div class="col-sm-3 text-center">
<h2>Sign up & Save 20%</h2>
<div class="block newsletter">
<div class="title"><strong>Newsletter</strong></div>
<div class="content">
<form class="form subscribe" novalidate="novalidate" action="http://******.com/newsletter/subscriber/new/" method="post" id="newsletter-validate-detail">
<div class="field newsletter">
<div class="control">
<label for="newsletter">
<span class="label">
Sign Up for Our Newsletter: </span>
<input name="email" type="email" id="newsletter" placeholder="Enter your email address" data-validate="{required:true, 'validate-email':true}">
</label>
</div>
</div>
<div class="actions">
<button class="action subscribe primary" title="Subscribe" type="submit" aria-label="Subscribe">
<span>Subscribe</span>
</button>
</div>
</form>
</div>
<h2>About Us</h2>
<p>place holder text here.</p>
</div><div class="col-sm-3 text-center">
<h2>More on Us</h2>
<ul>
<li><a href="#" aria-label="About Us link" title="About us">About us</a></li>
<li><a href="#" aria-label="Conflict-Free link" title="Conflict-link">Conflict-link Diamonds</a></li>
<li><a href="#" aria-label="Shipping& Returns Link" title="Shipping & Returns">Shipping & Returns</a></li>
<li><a href="#" aria-label="Privacy Policy Link" title="Privacy Policy">Privacy Policy</a></li>
<li><a href="http://****.com//contact" aria-label="Contact Us Link" title="Contact Us">Contact Us</a></li>
</div><div class="col-sm-3 text-center">
<h2>Help & Faqs</h2>
<ul>
<li><a href="#" title="My Account">My account</a></li>
<li><a href="#" title="Order History">Order history</a></li>
<li><a href="#" title="Track My Order">Track my order</a></li>
<li><a href="#" title="FAQ's">FAQ's</a></li>
</ul>
</div>
</div><div class="col-sm-3 text-center">
<h2>Follow us!</h2>
<ul>
<li class="in"> </li>
<li class="fb"> </li>
<li class="yu"> </li>
<li class="tw"> </li>
<li class="pt"> </li>