Support » Everything else WordPress » Need some help for CSS

  • baal666



    I need to add a CSS image to the top right of an extract; I have a comment bubble that I want to be “under” the total number of comments.

    Here is the index.php:

    <?php if (have_posts()) : ?>
    		<?php $count=0; while (have_posts()) : the_post(); if(!($firstpost == $post->ID)) : ?>
    		<?php if($count % 2 == 0) echo '<div class="left">'; else echo '<div class="right">'; ?>
    			<div class="post" id="post-<?php the_ID(); ?>" style="">
    				<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    				<small><abbr title="<?php the_time('Y-m-d\TH:i:sO'); ?>"><?php unset($previousday); printf(__('%1$s – %2$s'), the_date('', '', '', false), get_the_time()) ?></abbr> |
    	<img src="<?php bloginfo('template_directory'); ?>/i/cm.gif" alt="comment" />
    				<?php comments_popup_link('0', '1', '%'); ?> </small>
    					<?php the_content_rss('', TRUE, '', 50) ; ?>
                        </div><!-- fermeture de class left ou right   !-->
                        <div class="clear"></div>

    I tried to use the classes “left” and “right” but I was not able to add a background image to them.

    How would you do to get <?php comments_popup_link('0', '1', '%'); ?>
    inside the i/cm.gif image?

    I tried something like this ` .left {float:left; width:240px; padding-right:10px; border-right:1px dashed #ccc; color:#666; background-image:url (i/dot.gif) right;}
    .right {float:right;padding-right:20px;width:240px; color:#666; background:url (i/dot.gif) right;}`

    but it is a failure. If anyone could help, I would appreciate a lot!


  • The topic ‘Need some help for CSS’ is closed to new replies.