Title: Offset using CSS
Last modified: November 1, 2022

---

# Offset using CSS

 *  [mattwmc2001](https://wordpress.org/support/users/mattwmc2001/)
 * (@mattwmc2001)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/offset-using-css/)
 * Just wanted to chime in and say that I was searching for a way to offset the 
   Popular Posts widget as I use two widgets in my sidebar that are separated by
   an ad.
 * So what I did was have the first show three results.
 * Then the second widget shows six results and gets its own CSS class.
 * You can then target the child elements underneath using CSS first-child, nth-
   child(2), nth-child(3) using display: none, which makes them disappear leaving
   results 4,5 and 6.
 * So now I have a sidebar with popular posts showing the first six results but 
   with an ad inbetween.
 * Hope it helps someone.
    -  This topic was modified 3 years, 7 months ago by [mattwmc2001](https://wordpress.org/support/users/mattwmc2001/).

Viewing 1 replies (of 1 total)

 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/offset-using-css/#post-16152766)
 * Hi [@mattwmc2001](https://wordpress.org/support/users/mattwmc2001/),
 * Thanks for sharing! Hopefully someone will find it useful in the future 🙂
 * Have a nice day!

Viewing 1 replies (of 1 total)

The topic ‘Offset using CSS’ is closed to new replies.

 * ![](https://ps.w.org/wordpress-popular-posts/assets/icon-256x256.png?rev=1232659)
 * [WP Popular Posts](https://wordpress.org/plugins/wordpress-popular-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-popular-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-popular-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-popular-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-popular-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-popular-posts/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * Last activity: [3 years, 7 months ago](https://wordpress.org/support/topic/offset-using-css/#post-16152766)
 * Status: not a support question