ul li styling issue
5 posts by 2 authors in: Forums > CMS Builder
Last Post: December 10, 2012 (RSS)
By KCMedia - December 10, 2012
i have this ul li list that is like below and it is drawing the list of the titles from a multisection to display as a drop down menu how can make it so that the last title in the list will have a different style in the drop down than the other ones in the list see the li class none but the others have to have the right styling.
<ul>
<li><a href="#">Nutrition Basics</a></li>
<li><a href="#">G7 Day Rapid shape-Up Plan</a></li>
<li><a href="#">6 Weeks to a New You</a></li>
<li><a href="#">Maintaining your Shape for Life</a></li>
<li><a href="#">Great Shape-Up Recipes</a></li>
<li><a href="#">Food & Nutrition Tables</a></li>
<li class="none"><a href="#">More Great Stuff on Nutrition</a></li>
</ul>
Craig
KC Media Solutions
www.kcmedia.biz
Re: [kcmedia] ul li styling issue
By Toledoh - December 10, 2012
http://www.w3schools.com/cssref/sel_last-child.asp
Tim (toledoh.com.au)
Re: [Toledoh] ul li styling issue
By KCMedia - December 10, 2012
i know but i have tried that also but the issue is that because i have this output from cmsb how do i style that into the list
<?php foreach ($nutrition_pagesRecords as $record): ?>
Record Number: <?php echo htmlencode($record['num']) ?><br/>
Title: <?php echo htmlencode($record['title']) ?><br/>
Content: <?php echo $record['content']; ?><br/>
Page Title: <?php echo htmlencode($record['page_title']) ?><br/>
Keywords: <?php echo htmlencode($record['keywords']) ?><br/>
Description: <?php echo htmlencode($record['description']) ?><br/>
_link : <a href="<?php echo $record['_link'] ?>"><?php echo $record['_link'] ?></a><br/>
<hr/>
<?php endforeach ?>
<?php if (!$nutrition_pagesRecords): ?>
No records were found!<br/><br/>
<?php endif ?>
how do i set the last option into the code then.
Craig
KC Media Solutions
www.kcmedia.biz
Re: [kcmedia] ul li styling issue
By Toledoh - December 10, 2012
for each....
<div class="block">
Record Number....
_link...
</div>
end for each
Then in the css;
.block{ border-bottom:1px solid red;}
.block:last-child{ border-bottom:none;}
Tim (toledoh.com.au)
Re: [kcmedia] ul li styling issue
By KCMedia - December 10, 2012
thanks mate i will give that a try later on.
Craig
KC Media Solutions
www.kcmedia.biz