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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T04:00:59+00:00 2026-06-19T04:00:59+00:00

I have my code here: http://jsfiddle.net/u9BsD/2/ You will see the second section #indoorRange the

  • 0

I have my code here: http://jsfiddle.net/u9BsD/2/

You will see the second section #indoorRange the last-child is being applied pushing the last box to the right and extending the width 1% more. The first section #membership is the exact same, but with three blocks but the last-child class is not effecting the element it should. Is there some rule surrounding the last-child rule I am not aware of?

Thank you for your help.

<div id="memberships">
<div class="greyHeading">
    <header>
         <h3>Individual Membership:</h3>

    </header>
    <p>$175.00</p>
</div>
<div class="greyHeading">
    <header>
         <h3>Family Membership:</h3>

    </header>
    <p>$200.00 (Includes spouse and children under 21)</p>
</div>
<div class="greyHeading">
    <header>
         <h3>Red, White and Blue Discounts:</h3>

    </header>
    <p>Active LE, military, and 1st responders: 1/2 price membership discount!</p>
    <p>Retired LE, military and 1st responders 25% discount on membership!</p>
</div>
<div class="cl"></div>
</div>
<div id="indoorRange">
<div class="greyHeading">
    <header>
         <h3>Range Fees</h3>

    </header>
    <p>The range fees are per session. A "session" is defined as a visit to Allen
        Arms Indoor Shooting Range. We reserve the right to limit sessions to one
        hour if other customers are waiting for lanes.</p>
    <p>All lanes limited to two shooters unless special permission is obtained
        in advance.</p>
</div>
<div class="greyHeading">
    <header>
         <h3>Single Session</h3>

    </header>
    <ul>
        <li>One Adult Shooter: $10.00</li>
        <li>Two Adult Shooters on Same Lane: $7.50 Each</li>
        <li>Children under 18 with paying adult guardian: Free</li>
    </ul>
</div>
<div class="greyHeading">
    <header>
         <h3>Ladies Day</h3>

    </header>
    <p>Every Wednesday is Ladies Day! Women shoot for $5.00. Additionally, women
        receive 20% off range memberships.</p>
</div>
<div class="greyHeading">
    <header>
         <h3>Red White and Blue Discounts</h3>

    </header>
    <p>Law Enforcement, Active Duty Military, First Responders, and Security
        personnel pay only $5.00 per session any time, and receive 50% discount
        on memberships!</p>
</div>
</div>


#memberships .greyHeading {
float: left;
width: 32%;
margin: 0 1% 0 0;
}
#memberships .greyHeading:last-child {
float: right;
margin: 0;
width: 33%;
}
#memberships .greyHeading header {
background: #666;
margin: 0 0 10px 0;
}
#memberships .greyHeading header h3 {
color: #fff;
text-shadow: 0px 1px 1px rgba(0, 0, 0, 1);
line-height: 25px;
margin: 0;
padding: 5px 0 1px 5px;
}
#indoorRange .greyHeading {
float: left;
width: 24%;
margin: 0 1% 0 0;
}
#indoorRange .greyHeading:last-child {
float: right;
margin: 0;
width: 25%;
}
#indoorRange .greyHeading header {
background: #666;
margin: 0 0 10px 0;
height: 55px;
}
#indoorRange .greyHeading header h3 {
color: #fff;
text-shadow: 0px 1px 1px rgba(0, 0, 0, 1);
line-height: 25px;
margin: 0;
padding: 5px 0 1px 5px;
}
  • 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-19T04:01:00+00:00Added an answer on June 19, 2026 at 4:01 am

    Remove <div class="cl"></div> from the HTML and add #indoorRange { clear: both; } to the css, I believe this fixes it.

    The styling wasn’t applied to the last memberships greyHeading as due to the <div class="cl"> element it wasn’t actually the last child.

    EDIT: fiddle for proof

    EDIT2: I was right about the cl div having the style applied, you may be able to use the last-of-type pseudo selector to achieve what you want also, I don’t know what browser support is like unfortunately.

    See this SO question for more information:

    CSS last-child selector: select last-element of specific class, not last child inside of parent?

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

Sidebar

Related Questions

I have this code here http://jsfiddle.net/RzBeM/65/ you will see two input fields called quantity.
All of this is code is here: http://jsfiddle.net/yrgK8/ I have a news section which
Note: Please see demo code here: http://jsfiddle.net/ginja/5yp7D/ I have a set of objects that
I have a fiddle here http://jsfiddle.net/WULsZ/1/ I load jQuery first and the code is
I have a code that doesn't work. This is here http://jsfiddle.net/JPBarbosa/uxwTM/4/ . The data
Example code here: http://jsfiddle.net/pDuxe/ I have a droppable space with two draggable elements. I
I have code located here http://jsfiddle.net/jostster/5XAUb/ This works in Safari / FF (for the
I have the code here: http://jsfiddle.net/vFJvL/ when you mouseover Submenu3 the product list dropsdown
I have some code here: http://jsfiddle.net/zkRq2/2/ that I am having issues with. If you
CODE HERE: http://jsfiddle.net/B7Y43/ Hello fello programmers, I have the following situation: My PHP-script generates

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.