Reputation: 253
Hello I have some php which is generating a list for me. I added the
<?php
$termid = arg(2);
$terms = taxonomy_get_related($termid, $key = 'tid');
//print_r($terms);
foreach($terms as $term){
$link = url('taxonomy/term/'.$term->tid);
echo '<li><a href="'.$link.'">'.$term->name.'</a></li>';
}
?>
I was wanting to style my list though and tried -
<div class="sidey"><?php
$termid = arg(2);
$terms = taxonomy_get_related($termid, $key = 'tid');
//print_r($terms);
foreach($terms as $term){
$link = url('taxonomy/term/'.$term->tid);
echo '<li><a href="'.$link.'">'.$term->name.'</a></li>';
}
?></div>
with-
.sidey .inner ul li, .sidey .view-content div.views-row {
border-bottom-color: #DDDDDD;
list-style-image: none;
line-height: 130%;
padding: 5px 0;
border-bottom-style: solid;
border-bottom-width: 1px;
}
but to no effect. Should this work or am i missing something very fundamental here? I think i am. Also tried this but again to no avail-
<?php
$termid = arg(2);
$terms = taxonomy_get_related($termid, $key = 'tid');
//print_r($terms);
foreach($terms as $term){
$link = url('taxonomy/term/'.$term->tid);
echo '<div id="sidey"><li><a href="'.$link.'">'.$term->name.'</a></li></div>';
}
?>
Could anyone point me in the right direction? Thanks
Upvotes: 1
Views: 94
Reputation: 479
If you are going to assign an ID to the div then make sure you open and close your UL (like someone mentioned below), then your CSS should be:
div#sidey ul li {
border-bottom-color: #DDDDDD;
list-style-image: none;
line-height: 130%;
padding: 5px 0;
border-bottom-style: solid;
border-bottom-width: 1px;
}
Upvotes: 0
Reputation: 2748
You are missing the beginning and ending of unordered list <ul></ul>
Upvotes: 3