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 8947539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T12:47:16+00:00 2026-06-15T12:47:16+00:00

I am trying out zen-grids for a website re-design. I like its general ability

  • 0

I am trying out zen-grids for a website re-design. I like its general ability to produce a grid based, responsive design without putting everything into extra <div>s and adding layout related class names to the tags. I use SASS/Compass anyways, so zen-grids is an obvious choice. But I have a hard time to figure out how to best achieve the following “floating list items” effect (e.g. for a typical product grid in a web store):

<html>
  <head>
    <style>
    ul {
      width:100%;
      list-style-type:none;
      margin:0;
      padding:0;
    }
    li {
      width:25%;
      height:10em;
      background-color: silver;
      float:left;
    }
    </style>
  </head>
  <body>
    <ul>
      <li>1</li>
      <li>2</li>
      <li>3</li>
      <li>4</li>
      <li>5</li>
      <li>6</li>
    </ul>
  </body>
</html>

Say I have a 12 column layout ($zen-column-count: 12;), how could I use zen-grids to put four list items covering three grid columns each next to each other into one row? The only possibility I see myself is to use four different CSS :nth-child pseudo classes and @include zen-grid-item(3, [start column here]);. This rules out all Internet Explorer versions below 9, lacking implementation of that pseudo class.

Does anybody know how to do 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-15T12:47:18+00:00Added an answer on June 15, 2026 at 12:47 pm

    Salsa magic

    I solved the problem by changing the tools: Tsachi Shlidor‘s Salsa is an alternative grid layout system for Sass, which makes the following solution without :nth-child() possible. I added a little respond-to responsiveness as well.

    style.scss (compile with compass)

    @import "salsa/salsa";
    $base-font-size: 100%;
    $base-line-height: 1.5em;
    $container-width: 100%;
    $gutter-width: $base-line-height;
    
    @import "respond-to";
    $breakpoints: "wide screen" (50em),
                  "narrow screen" (0em 50em);
    
    
    body {
        @include container;
    }
    ul {
        list-style-type: none;
        padding-left: 0;
        li {
            height: 10em;
            background-color: silver;
        }
    }
    /* layout for narrow screens: 2 items per row */
    $columns: 8;
    @include respond-to('narrow screen') {
        ul {
            li {
                @include grid(4);
            }
        }
    }
    /* layout for wide screens: 4 items per row */
    $columns: 16;
    @include respond-to('wide screen') {
        ul {
            li {
                @include grid(4);
            }
        }
    }
    

    index.html

    <html>
      <head>
        <link rel="stylesheet" href="style.css"/>
      </head>
      <body>
        <ul>
          <li>1</li>
          <li>2</li>
          <li>3</li>
          <li>4</li>
          <li>5</li>
          <li>6</li>
        </ul>
      </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While trying out an experimental UINavigationController-based iPhone application, I ran into a problem when
Background: I am trying to edit a zen cart horizontal pop out menu to
I'm currently trying out db4o (the java version) and I pretty much like what
I'm trying out the following query: SELECT A,B,C FROM table WHERE field LIKE 'query%'
I trying out Django's class based views (CBVs). class BlahView(TemplateView): template_name = 'blah/blah.html' def
Trying out this Copy Website feature in Visual Studio. On my remote site the
Trying out the example usage of codebrew rails-backbone , everything works fine but the
Trying out the examples found on pleac.sf.net , I'm not able to get an
Im trying out the banking sample application and when i try to add or
After trying out VS2010b2 also my VS2008 installation changes the versions of solution and

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.