Title: Query Posts by Random &#8211; Causing CSS to break?
Last modified: August 19, 2016

---

# Query Posts by Random – Causing CSS to break?

 *  [lovejungle](https://wordpress.org/support/users/lovejungle/)
 * (@lovejungle)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/query-posts-by-random-causing-css-to-break/)
 * `<?php query_posts($query_string . '&orderby=rand') ?>`
 * Hey all,
 * I’ve tried to implement this piece of code into my portfolio page template.php.
   
   [http://www.some-things.net/category/work/](http://www.some-things.net/category/work/)
 * It’s causing the css to break every so often. Reload it until it breaks and you
   will see what I mean.
    It pushes 2 of the portfolioitem blocks to the right a
   touch and forces the third to drop a line?
 * _[Code moderated as per the [Forum Rules](http://codex.wordpress.org/Forum_Welcome).
   Please use the [pastebin](http://wordpress.pastebin.com/)]_

The topic ‘Query Posts by Random – Causing CSS to break?’ is closed to new replies.

## Tags

 * [posts](https://wordpress.org/support/topic-tag/posts/)
 * [query](https://wordpress.org/support/topic-tag/query/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [lovejungle](https://wordpress.org/support/users/lovejungle/)
 * Last activity: [15 years, 3 months ago](https://wordpress.org/support/topic/query-posts-by-random-causing-css-to-break/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
