WordPress.org

Ready to get started?Download WordPress

Forums

Category Icons Positioning Help (3 posts)

  1. webdesignerwp
    Member
    Posted 1 year ago #

    Good Morning,

    I'm attempting to add category icons to an existing theme on this blog:
    http://1morethan2.com/

    I added a plugin called Category Icons and successfully added in the code <?php if (function_exists('get_cat_icon')) get_cat_icon(); ?> to multiple template files. The icon does show, but I'm having some trouble getting the article title to float next to it.

    Here is what my code looks like:

    <div style="float:left; margin-right:10px; width:15px;">
    <?php if (function_exists('get_cat_icon')) get_cat_icon(); ?>
    </div>
    <div style="float:left;">
    <h4 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'colabsthemes' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h4>
    </div>
    <div class="clear"></div>

    Any idea what I'm doing wrong?

    Thanks.

  2. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    for formatting problems, please try working with a browser inspection tool, such as Firebug, to get a better idea which styles are influencing the formatting,
    or ask at a css forum like http://csscreator.com/forum

  3. Andrew Nevins
    Spam zapper & Volunteer Moderator
    Posted 1 year ago #

    Widen the width of the <div> that contains the icon.

Topic Closed

This topic has been closed to new replies.

About this Topic