I have set up a div box to display the latest news, with each news item separated by a border-bottom. Instead of using ul li in the HTML, I am opting for simple div elements. However, I am encountering an issue where the last news item also displays the border-bottom separator. I have attempted to use the :last-child selector to remove it, but without success. I am aware that using ul li would allow me to solve the problem with :last-child, but I prefer not to alter my HTML structure. Below is a snapshot:
HTML CODE:
<div class="float_left_div posts">
<h3>Latest News</h3>
<div class="news_wrapper">
<div class="news_txt">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy. <span>more+</span></p>
</div>
<div class="div_separator"></div>
</div>
<div class="news_wrapper">
<div class="news_txt">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy. <span>more+</span></p>
</div>
<div class="div_separator"></div>
</div>
<div class="news_wrapper">
<div class="news_txt">
<p>Lorem ipsum dolor sit amet, consectiuer adipiscing elit, sed diam nonummy. <span>more+</span></p>
</div>
<div class="div_separator"></div>
</div>
</div>
View the demo here on JSFiddle.
How can we remove the last border-bottom separator while keeping the same HTML structure?