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

  • Home
  • SEARCH
  • 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 6540363
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:58:11+00:00 2026-05-25T10:58:11+00:00

Minor cosmetic issue.. I am in the process of developing a forum based site

  • 0

Minor cosmetic issue.. I am in the process of developing a forum based site with dynamic PHP tables that include headers and footers. I currently have a CSS conditional statement for alternating background colors for even and odd rows in my tables.

<!-- IF forumrow.S_ROW_COUNT is even-->
   <li class="row" style="background-color:#536482;">
<!-- ELSE -->
   <li class="row" style="background-color:#E0EBB2;">
<!-- ENDIF -->

My issue is that the common footer of my tables are the same color as the even count in my conditional statement and it would look kind of weird, like it would make the footer look larger than it actually is if it were the same color as the last row, that is if the table were to end on an even numbered row.

My question is if there is anything I can add to my conditional statement to make it start at the last row of my tables? Then the last row against the footer would always be #E0EBB2.

Thanks in advance.

  • 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-05-25T10:58:12+00:00Added an answer on May 25, 2026 at 10:58 am

    You can use just the css pseudo selector nth-last-child and nothing more.

    Try it:

    ul li {
       background-color: #536482;
    }
    
    ul li:nth-last-child(odd) {
        background-color: #E0EBB2;
    }
    

    Working example here.

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

Sidebar

Related Questions

I'm having a minor issue dealing with pointers to overloaded member functions in C++.
I have a minor mode. If that mode is active and the user hits
Minor point about LaTeX that bothers me. When one writes a^b^c, a_b_c or a'^b
A minor question that I hope admits of a simple answer that I'll kick
I have a minor issue in handling DateTime in C#. I have designed a
Two hopefully minor questions regarding CoreData that I've been unable to find answers to:
I'm having a minor css issue. I have a series of layered divs and
I recently got tossed some C# code to make some minor cosmetic changes to.
This is a pretty minor issue but it's bugging me - I am trying
This is a minor issue, but one I find myself running into: When I

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.