Inserting Multiple Block Types in one div row I have a matrix with a block type call pageRelatedContent. A user can add multiple block to their entry. I am trying to put all the pageRelatedContent blocks in one div row. For this example, I have three pageRelatedContent blocks in this entry. My code is generating three separate rows. Its a coding thing that I am missing. Can someone please assist.

Here is the rendered HTML:


Here is the desired output:


Here is my code. I can see that it is creating a row for every block, but I can't seem to figure out how to insert all the block in one row.

    {% case 'pageRelatedContent' %}
{% set relatedContentBlocks = entry.memberCommunicationsPageContent.type('pageRelatedContent') %}
{% if entry.memberCommunicationsPageContent.type('pageRelatedContent')|length == 1 %}
    {% set colSize = 12 %}
{% elseif entry.memberCommunicationsPageContent.type('pageRelatedContent')|length == 2 %}
    {% set colSize = 6 %}
{% elseif entry.memberCommunicationsPageContent.type('pageRelatedContent')|length == 3 %}
    {% set colSize = 4 %}
{% endif %}
    &lt;div class="section-empty section-item"&gt;
        &lt;div class="container content"&gt;
            &lt;div class="row"&gt;
                {% set relatedBlockInfo = relatedContentBlocks|batch(colSize) %}
                {% for blocks in relatedBlockInfo %}
                &lt;div class="col-md-{{ colSize }}"&gt;
                    &lt;div class="list-group accordion-list"&gt;
                        &lt;div class="list-group-item active-panel"&gt;
                            &lt;a href="#" class="active"&gt; {{ block.relatedContentTitle }}&lt;/a&gt;
                            &lt;div class="panel" style="display: block; height: 182px;"&gt;
                                &lt;div class="inner"&gt;
                                    &lt;ul class="list-texts text-left"&gt;
                                        {% for row in block.relatedLinkInformation %}
                                        &lt;li&gt;&lt;a href="{{row.linkUrl }}"&gt;{{ row.linkTitle }}&lt;/a&gt;&lt;/li&gt;
                                        {% endfor %}
                                    &lt;/ul&gt;  
                                &lt;/div&gt;
                            &lt;/div&gt;
                        &lt;/div&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
                {% endfor %}
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;


Here is the matrix information:
It wasn't a CSS issue. Lack of twig knowledge. Here is the final fix.

    {% case 'pageRelatedContent' %}
{% set relatedContentBlocks = entry.memberCommunicationsPageContent.type('pageRelatedContent') %}
{% if entry.memberCommunicationsPageContent.type('pageRelatedContent')|length == 1 %}
    {% set colSize = 12 %}
{% elseif entry.memberCommunicationsPageContent.type('pageRelatedContent')|length == 2 %}
    {% set colSize = 6 %}
{% elseif entry.memberCommunicationsPageContent.type('pageRelatedContent')|length == 3 %}
    {% set colSize = 4 %}
{% endif %}
    {% set isFirst = not block.getPrev() or block.getPrev().type != 'pageRelatedContent' %}
        {% if isFirst %}
            &lt;div class="section-empty section-item"&gt;
                &lt;div class="container content"&gt;
                    &lt;div class="row"&gt;
        {% endif %}
        {% set relatedBlockInfo = relatedContentBlocks|batch(colSize) %}
        {% for blocks in relatedBlockInfo %}
        &lt;div class="col-md-{{ colSize }}"&gt;
            &lt;div class="list-group accordion-list"&gt;
                &lt;div class="list-group-item active-panel"&gt;
                    &lt;a href="#" class="active"&gt; {{ block.relatedContentTitle }}&lt;/a&gt;
                    &lt;div class="panel" style="display: block; height: 182px;"&gt;
                        &lt;div class="inner"&gt;
                            &lt;ul class="list-texts text-left"&gt;
                                {% for row in block.relatedLinkInformation %}
                                &lt;li&gt;&lt;a href="{{row.linkUrl }}"&gt;{{ row.linkTitle }}&lt;/a&gt;&lt;/li&gt;
                                {% endfor %}
                            &lt;/ul&gt;  
                        &lt;/div&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
            &lt;/div&gt;
        &lt;/div&gt;
        {% endfor %}
    {% set isLast = not block.getNext() or block.getNext().type !='pageRelatedContent' %}
        {% if isLast %}
                &lt;/div&gt;
            &lt;/div&gt;
        &lt;/div&gt;
        {% endif %}