Category Icons Positioning Help (3 posts)

  1. webdesignerwp
    Posted 2 years ago #

    Good Morning,

    I'm attempting to add category icons to an existing theme on this blog:

    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 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 class="clear"></div>

    Any idea what I'm doing wrong?


  2. Michael
    Part-Time Forum Moderator
    Posted 2 years 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
    Forum moderator
    Posted 2 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic