PDA

View Full Version : Top Commentators - Layout problem


amituofo
05-11-2008, 06:42 PM
I don't know if this is the right place for me to ask but I've been struggling to actually put the no. after the name of the top commentator on the same line.

Reason is because the (ul) is set to display:block. So it will looks something like this

Yan
(3)

Instead of Yan (3)

This is my CSS


#sidebar ul li {
display: inline;
}

#sidebar ul li a {
display: block;
color : #777;
padding : 3px 7px 3px 7px;
border-bottom : 1px solid #eee;
}

#sidebar ul li a:hover {
background : #f9f9f9;
}



PHP Code


<?php if(function_exists('ns_show_top_commentators')) { ?>
<h3>Top Commentators</h3>
<ul><?php ns_show_top_commentators(); ?></ul>
<?php } ?>


Anyone kind enough to help me?

SarahG
05-11-2008, 07:50 PM
Why is your link set to display block? Remove that and it'll be fine. The trouble is the top commentators code outputs the name linked and the number of comments unlinked. If you need to keep display block there for something else, then specify an id or class for the ul and set display: inline on the link for that eg

#sidebar ul#topcoms li a { display:inline }

However if you don't need the display block for anything else then I'd remove that.

amituofo
05-18-2008, 02:38 AM
Thanks, Sarah. Sorry for the late reply. Let's see how it goes...

Update: Sad to say, it doesn't work. The theme design is set to 'block' which I can't change it to 'inline' as it will break the design. Actually I have tried that but with my limited knowledge of CSS, the list got messy when I set it to 'inline' as per your suggestion.