[![enter image description here](https://i.stack.imgur.com/mbRD6.png)](https://i.stack.imgur.com/mbRD6.png)Can someone please explain to me why this is happening? My mobile views work fine but it breaks to the attached pic when I expand the window.The code for both cards is literally identical as shown below:

```
<!-- This is the view for the page: -->
<div class="col-12 col-md-9">
  <div class="col-12 d-flex align-items-center mb-3">
    <span class="h2"> Spread the Knowledge </span>
    <%= link_to fa_icon("edit"), new_discussion_path, class: "profile-link fa-2x"  %>
  </div>
  <div class="col-xs-12 col-md-9 mb-4">
    <div class="card">
      <div class="card-header">
        <h4>Answered Questions</h4>
      </div>
      <div class="list-group list-group-flush">
        <%= render "answered_disc" %>
      </div>
      <div class="card-footer text-center d-none">
        See all
      </div>
    </div>
  </div>
  <div class="col-xs-12 col-md-9 mb-4">
    <div class="card">
      <div class="card-header">
        <h4>Unanswered Questions</h4>
      </div>
      <div class="list-group list-group-flush">
        <%= render "unanswered_disc" %>
      </div>
      <div class="card-footer text-center d-none">
        See all
      </div>
    </div>
  </div>
</div>

```

Both partials display the following code:

```
<% @discussions.each do |discussion| %>
    <% if discussion.parent_id.nil? && discussion.resolved == true %>
        <div class="list-group-item">
          <div class="row">

             <div class="wadinfo col-xs-12 col-md-9 mb-4">
                 <%= link_to discussion_path(discussion), class: 'profile-link' do %>
                        <h6 class="small"><%= discussion.content  %></h6>
                    </div>
                <% end %>
             </div>

             <div class="actions">
                        <% if discussion.resolved == false %>
                        <%= link_to 'Answer', discussion_path(discussion), class: 'profile-link' %>
                        <% else %>
                        <%= link_to 'Contribute', discussion_path(discussion), class: 'profile-link' %>
                        <% end %>
             </div>

          </div>
        </div>
    <% end %>
<% end %>

<!-- Code for menu -->
<div class="row row-sidebar">
  <div class="col-12 mb-3 text-center">
  </div>

  <div class="col-12">
    <ul class="list-group">
      <% sidebar_elements.each do |element| %>
        <a class="list-group-item list-group-item-action" href="<%= element[:link] %>">
          <%= element[:name] %>
        </a>
      <% end %>
    </ul>
  </div>
</div>

```

The sidebar is rendered as a partial in a manifest file:

```
<% content_for :sub_layout do %>
  <div class="row mt-4">
    <div class="d-none d-md-flex col-3 align-items-start">
        <%= render "wads/sidebar" %>
    </div>

    <%= yield %>
  </div>
<% end %>

<%= render template: 'layouts/application' %>

```

Very confused as the code is identical