Answers.Body: <p>I can't see why Craft would be breaking a CSS rule, you're outputting three items and is it outputting the 3 items on the page?</p>
  
  <p>If yes, then the CSS rule might need to be fixed. If not, then I don't understand your problem.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-04-13T15:44:46.200Z
Answers.LastActivityDate: 2017-04-13T18:09:12.360Z
Answers.LastEditDate: 2017-04-13T18:09:12.360Z
Answers.UserDisplayName: Brad
Body: <p>For some reason, when outputting 'featured' tagged items, It's ordering them I presume by alphabetical values which is breaking the nth-child CSS set on every 3rd element? Is there anyway to stop this?</p>
  
  <p><strong>Getting Tagged Categories</strong></p>
  
  <pre><code>  {% set tag = craft.tags.slug('featured').first() %}
    {% set categories = craft.categories.relatedTo(tag) %}
  
    {% if categories|length %}
      {% for category in categories.limit(3) %}
  
        &lt;a class="university-widget w-inline-block" href="{{ category.url }}"&gt;
  
          {% for asset in category.universityImage %}
            &lt;div class="university-widget-image" style="background-image:url({{ asset.url }})"&gt;&lt;/div&gt;
          {% endfor %}
  
          &lt;div class="university-widget-content"&gt;
            {% for asset in category.universityLogo %}
              &lt;img class="university-widget-logo" src="{{asset.url}}" height="40"&gt;
            {% endfor %}
            &lt;p class="small-paragraph university-widget-description-test" id="university-widget-description"&gt;{{ category.description }}&lt;/p&gt;
          &lt;/div&gt;
        &lt;/a&gt;
  
      {% endfor %}
    {% endif %}
  </code></pre>
  
  <p><strong>CSS</strong></p>
  
  <pre><code>.university-widget:nth-child(3n)
  {
    margin-right:0px;
  }
  </code></pre>
  
  <p>Picture Evidence</p>
  
  <p><a href="https://i.sstatic.net/Gh7c8.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Gh7c8.png" alt="enter image description here"></a></p>
  
Tags: <entries><categories>
Title: Craft Ordering breaking nth child?
ThreadText: # Craft Ordering breaking nth child?
  
  (Asked by: username_0 on 2017-04-13)
  
  For some reason, when outputting 'featured' tagged items, It's ordering them I presume by alphabetical values which is breaking the nth-child CSS set on every 3rd element? Is there anyway to stop this?
  
  **Getting Tagged Categories**
  
  ```
    {% set tag = craft.tags.slug('featured').first() %}
    {% set categories = craft.categories.relatedTo(tag) %}
  
    {% if categories|length %}
      {% for category in categories.limit(3) %}
  
        <a class="university-widget w-inline-block" href="{{ category.url }}">
  
          {% for asset in category.universityImage %}
            <div class="university-widget-image" style="background-image:url({{ asset.url }})"></div>
          {% endfor %}
  
          <div class="university-widget-content">
            {% for asset in category.universityLogo %}
              <img class="university-widget-logo" src="{{asset.url}}" height="40">
            {% endfor %}
            <p class="small-paragraph university-widget-description-test" id="university-widget-description">{{ category.description }}</p>
          </div>
        </a>
  
      {% endfor %}
    {% endif %}
  
  ```
  
  **CSS**
  
  ```
  .university-widget:nth-child(3n)
  {
    margin-right:0px;
  }
  
  ```
  
  Picture Evidence
  
  [![enter image description here](https://i.sstatic.net/Gh7c8.png)](https://i.sstatic.net/Gh7c8.png)
  
  **Tags:** entries, categories
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-04-13. Score: 1
  
  I can't see why Craft would be breaking a CSS rule, you're outputting three items and is it outputting the 3 items on the page?
  
  If yes, then the CSS rule might need to be fixed. If not, then I don't understand your problem.
  
  
  ---
  
  