WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] make an image appear aligned to the left (3 posts)

  1. iceq
    Member
    Posted 2 years ago #

    Hi guyes. I installed User Photo plugin that allows to show an authors photo. So far so good, but I want it to be displayed not after the post date, but rather parrallel to the author's name and post date.
    The following image explains it all :

    http://imageshack.us/photo/my-images/710/17463280.jpg

    It does not appear like the photo has its own CSS class. Can I add custom class for the photo, then tweak it to accomplish what I am after?
    It would be great if you please also tell me what how would the code look like if I want to resize the image when it is displayed.

    The website where you can see it:
    http://kuttabna.net

    The code I am using to display that chunk:

    <h2 class="entry-title"></a><a>" rel="bookmark" title="<?php printf(__('رابط  %s', 'framework'), get_the_title()); ?>"> <?php the_title(); ?></a></h2>
    
    <!--BEGIN .entry-meta .entry-header-->
    						<div class="entry-meta entry-header">
    					<span class="published"> كتبها
    					<?php the_author_posts_link(); ?>  </span>
    					<span class="meta-sep">·</span>
    					<span class="published"> في <?php the_time( get_option('date_format') ); ?>
    <?php userphoto_the_author_thumbnail() ?></span>
    							<!--END .entry-meta entry-header -->
    						</div>
  2. iceq
    Member
    Posted 2 years ago #

    Okay it seems I managed to create a new CSS class.. I added in the css:

    #featured-posts-block .user-photo {}

    Then in the loop, I wrapped the user photo code in the same CSS thing, so it is now:
    <div class="user-photo"><?php userphoto_the_author_thumbnail() ?> </div>

    To test it, I added "border:2px solid blue;" to the CSS, and it showed up good..

    But I am unable to make it float to the right of the text , like I demonstrated in the photo above. Help is appreciated.

  3. iceq
    Member
    Posted 2 years ago #

    I managed to do it byt creating new "div.user-photo" in my CSS and added to it:
    float: right;

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags