私はここに私のコードを持っています: http://jsfiddle.net/u9BsD/2/
2 番目のセクション #indoorRange が表示され、最後の子が適用され、最後のボックスが右に押し出され、幅が 1% 拡張されます。最初のセクション #membership はまったく同じですが、3 つのブロックがありますが、最後の子クラスが要素に影響を与えていません。私が認識していない最後の子ルールに関するルールはありますか?
ご協力ありがとうございました。
<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;
}