ul li styling issue

5 posts by 2 authors in: Forums > CMS Builder
Last Post: December 10, 2012   (RSS)

Re: [kcmedia] ul li styling issue

Rather than doing it in the php, I would do it with css.
http://www.w3schools.com/cssref/sel_last-child.asp
Cheers,

Tim (toledoh.com.au)

Re: [Toledoh] ul li styling issue

Hi Tim

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.
Thanks



Craig

KC Media Solutions

www.kcmedia.biz

Re: [kcmedia] ul li styling issue

I would wrap the record in a div and give it a class; ie.

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;}
Cheers,

Tim (toledoh.com.au)

Re: [kcmedia] ul li styling issue

Hi Tim

thanks mate i will give that a try later on.
Thanks



Craig

KC Media Solutions

www.kcmedia.biz