Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2007
    Posts
    819
    Plugin Contributions
    0

    Default image display alignment

    hi,

    the code below displays the stars gif so that it sticks above the text it is next to. anyone know how to display the gif so it is in centered with the text next to it? in others a little of the image will be below the text and a little above (instead of all of the image above the text)...

    Code:
        echo TEXT_CURRENT_REVIEWS_RATING . ' <strong>' . $average_rating . '</strong> ' . zen_image(DIR_WS_TEMPLATE_IMAGES . 'stars_' . $stars_image_suffix . '.gif', sprintf(BOX_REVIEWS_TEXT_OF_5_STARS, $average_rating));
    thanks!

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: image display alignment

    We can't answer this without its page context. We need to see the site, or at the least the "view source" to know what HTML and class/id tags are being output.

  3. #3
    Join Date
    Feb 2007
    Posts
    819
    Plugin Contributions
    0

    Default Re: image display alignment

    hi. no problem. does this help from view source?

    Code:
    -->
    <p class="reviewCount">Average Rating: <strong>5</strong> <img src="includes/templates/template_default/images/stars_5.gif" alt="5 of 5 Stars!" title=" 5 of 5 Stars! " width="90" height="20" />Current Reviews: <strong>1</strong><br class="clearBoth" /><br class="clearBoth" /></p>
      <br class="clearBoth" />
    thanks!

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: image display alignment

    This output would normally display on one line, provided there is enough width to allow that. Any CSS that applies to this element directly or by descent could affect this. Can you show us the site live?

  5. #5
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: image display alignment

    Picture=1000 words... :)
    You do have the content displaying in one line, but the image is offset from the apparent baseline so as not to be centered on the text.

    Add to your stylesheet
    Code:
    .reviewCount img {position: relative; bottom: -0.5em;}

  6. #6
    Join Date
    Feb 2007
    Posts
    819
    Plugin Contributions
    0

    Default Re: image display alignment

    awesome. thank you!

 

 

Similar Threads

  1. Display alignment issue
    By Parafanaylya in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 13 Sep 2007, 01:49 PM
  2. Attributes display alignment
    By Parafanaylya in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 8 Jul 2006, 07:07 PM
  3. Attributes display alignment
    By Parafanaylya in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 8 Jul 2006, 07:44 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg