Hi! I have this php

 <?php /*
Example template
Author: Archon Digital (Jonathan Cuevas) http://archondigital.com/
*/ 


?><h4>Related Posts</h4>
<?php if ($related_query->have_posts()):?>
<ul class="related-posts" type="none">
    <?php while ($related_query->have_posts()) : $related_query->the_post(); ?>
    <li class="related-posts" type="none">  <?php $postimageurl = get_post_meta($post->ID, 'Thumbnail', true); if ($postimageurl) { ?>
            <a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/timthumb.php?src=<?php echo $postimageurl; ?>&h=100&w=100&zc=1&q=100" alt="<?php the_title(); ?>" width="100" height="100"/></a>
            <?php } else { ?>
            <a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/timthumb.php?src=<?php bloginfo('template_url'); ?>/default.jpg&h=100&w=100&zc=1&q=100" alt="<?php the_title(); ?>" width="100" height="100"/></a>    
            <?php } ?>
            <a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></li>
    <?php endwhile; ?>
</ul>
<?php else: ?>
<p>No related posts.</p>
<?php endif; ?>

and this style

ul.related-posts {
    float: left;
    list-style-type: none;
    margin: 0px;
    padding: 0px;
    border: 6px solid #e8e8e8;
    list-style-image: none;
}
.related-posts li {
    list-style-type: none;
    float: left;
    width: 120px;
    padding-right: 8px;
    padding-left: 8px;
    font-size: 12px;
    line-height: 18px;
    margin-top: 13px;
    border-left: 1px solid #e8e8e8;
    list-style-image: none;
}
.related-posts img{
    width: 100px;
    padding: 1px;
    border: 1px solid #CCC;
    list-style-image: none;
    list-style-type: none;
}

and yet I still get bullet points. The only way to remove them is to put "disc" to "none" in

.post ul li { list-style-position: inside; list-style-type: disc; line-height: 24px }

but this would also remove the bullet points from my paragraph, where I actually need them. Any help is greatly appreciated!

  • Really need to see an actual page rather than a snippet of context-free PHP. Paragraphs don't generally have bullet points unless you put them there yourself. Nathan Duran over 6 years ago

5 answers

0
points
This was chosen as the best answer

Specificity.

I wouldn't be surprised if you have a more specific style declaration somewhere, over-riding the styles you are trying to add.

use firebug or webkit inspector or similar to look at the css actually applied to the specific element, and you'll probably find it.

(or let us have a url to the problem page)

Answered over 6 years ago by Tony Crockford
love 38
0
points

none of ur css refering to the "li" that u want to hide the bullet.. bcoz.. ur "ul" & the "li" have the same class.. try to change the "li" class.. n the rest shuld be ok.. if :

<ul class="related-posts" type="none"><li class="related-posts" type="none"></li><ul>

".related-posts li" refering to :

<ul class="related-posts" type="none"><li class="related-posts" type="none">**<li></li>**</li><ul>
Answered over 6 years ago by love
  • I don't really understand what I should do... Sorry, my webdev capabilities are very close to none. Florian Wardell over 6 years ago
0
points

Hi Tony! This is a related post pluggin that appears under each of my posts, in a frame under the social media icons. At the bottom of this one for instance: http://techhaze.com/2010/04/mac-app-transmit-4/

I'd be really grateful if you had a look, because my CSS/PHP knowledge is more than limited.

Cheers!

Answered over 6 years ago by Florian Wardell
0
points

Okay, it's hard to tell for sure, as there are so many attempts to turn off the bullets, but I would suggest you add this to your CSS (at the bottom of style.css)

.post ul.related-posts li
{
    list-style-type: none;
}
Answered over 6 years ago by Tony Crockford
0
points

Thanks for your help! I changed

.related-posts li

to this

.post ul li.related-posts

So simple haha. Cheers!

Answered over 6 years ago by Florian Wardell