Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9164441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T14:41:03+00:00 2026-06-17T14:41:03+00:00

I ran into a problem when trying to style a home page that I

  • 0

I ran into a problem when trying to style a home page that I am working on. Here is very simple version of what I am doing. http://cdpn.io/kgLzD
I am using wordpress and have the_loop within a div which outputs 8 post with a class of “post”. The problem I am having is styling each post like the picture below because they are divs and have no control over choosing which “post” to style? If I was using a list then I could choose which item to style. Any help/tips/advice to achieving the styles below would be greatly appreciated.

Grid styles

enter image description here
This is where I currently am and as you can see all I basically need are the borders. How would you go about achieving this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T14:41:05+00:00Added an answer on June 17, 2026 at 2:41 pm

    You could use css nth-of-type() selector – since you are floating left and have the div’s two-up, using nth-of-type(2n) would select all of divs on in the right column: (see codepen here: http://cdpn.io/Iacvk)

    section.home-grid {
       width:440px; 
    }
    .post {
      border-top:1px solid #777;
      width: 200px;
      float:left;
      padding: 10px;  
    }
    .post p {
      padding:.5em 1em;
      width:90%;
      margin:0 auto;
      text-align:justify;
    }
    .post:nth-of-type(2n) p {
      border-left:2px dotted #777;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A problem I recently ran into was that when trying to update a field
I ran into a weird problem while trying to build a Traits GUI that
I ran into a problem today trying to override an implementation of an interface
I'm messing around with template specialization and I ran into a problem with trying
I just ran into a problem.. I'm trying to build a website at the
I was practising statements and ran into a problem. I'm trying to make it
I'm trying to extend JButton with Clojure, but I ran into a problem when
While trying out an experimental UINavigationController-based iPhone application, I ran into a problem when
I ran into a problem that suggests I may be implementing a design pattern
I've ran into a problem while trying to test following IRepository based on NHibernate:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.