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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T01:50:55+00:00 2026-06-18T01:50:55+00:00

I am currently making something like this: <div id=container> <div class=gridTab> Home </div> <div

  • 0

I am currently making something like this:

<div id="container">
 <div class="gridTab">
  Home
 </div>
 <div class="gridTab">
  Work
 </div>
 <div class="gridTab">
  Gallery
 </div>
 <div class="gridTab">
  Contact
 </div>
</div>

That each “gridTab” should have different colour. From the top to bottom.

  • 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-18T01:50:56+00:00Added an answer on June 18, 2026 at 1:50 am

    Use nth-child pseudo class

    .gridTab:nth-child(1){background:red}
    .gridTab:nth-child(2){background:lime}
    .gridTab:nth-child(3){background:green}
    .gridTab:nth-child(4){background:violet}
    

    DEMO


    If you are looking for IE9 below solution then use the following method

    For IE7+ Support

    .gridTab:first-child {background:red}
    .gridTab:first-child + div.gridTab{background:lime}
    .gridTab:first-child + div + div.gridTab{background:green}
    .gridTab:first-child + div + div + div.gridTab{background:violet}
    

    DEMO for IE7+

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got something like this currently: and I'm working on making it more like
I currently have an XML Structure that looks something like this <Parent> <Info> <Info-Data></Info-Data>
Program I'm making has a simple configuration file looking something like this. @overlays =
Hey guys, I have a UL like so: <ul id=list> <li class=something> <div class=btns
I currently have this on a webpage I'm making: HTML <div id=pageHeader> <nav id=siteNav>
I'm currently thinking of setting up a picture message import project. Something like this:
I'm trying to store a callback in a class. Currently, I do something like
I'm currently making an application with Backbone.js and some JQuery libraries. Today I work
I am currently making a program that will send an email if the date
I'm currently making a navigation with .active class as the user scrolls, but the

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.