Results 1 to 8 of 8
  1. #1
    Join Date
    Feb 2009
    Posts
    53
    Plugin Contributions
    0

    Default need help with lay-out of image and text on product page

    Hi,



    On my product pages I have a picture of the item with a short description in bullets to the right of that image. If the text is longer than the height of the image, it continues below the image instead of on the right side.

    Also, I would like for the image and the text to start at the same height (again, see screenshot please).

    It would be greatly appreciated if anyone could point me in the right direction. My shop: http://www.mylittletoy.com/index.php

  2. #2
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    6,173
    Plugin Contributions
    0

    Default Re: need help with lay-out of image and text on product page

    Quote Originally Posted by koenvandamme View Post
    Hi,



    On my product pages I have a picture of the item with a short description in bullets to the right of that image. If the text is longer than the height of the image, it continues below the image instead of on the right side.
    Ko,
    Question 1

    Edit your_template/ stylesheet.css

    Locate this element #productDescription

    If not there add to the sheet

    #productDescription {margin-left: 13em;}

    1. the red font highlighted above you will half to play with
    2. But this is fun to learn how the stylesheet.css controls the web page functions

  3. #3
    Join Date
    Jan 2005
    Location
    NY
    Posts
    149
    Plugin Contributions
    0

    Default Re: need help with lay-out of image and text on product page

    This is a problem that I always had with the stock product info page. My solution is to create 2 columns. In the tpl_product_info_display.php file of your template, you will need to wrap the main product image in a div and float it left, and then wrap the remaining items that you want to appear in the right column in another div, also floated left.

    <div id="prodInfoLeft">
    <!--bof Main Product Image -->
    ...
    </div>

    <div id="prodInfoRight">
    <!--bof Product Price-->
    ...
    <!--bof Product description -->
    ...
    </div>

    <br class="clearBoth" />


    Then your stylesheet add.

    #prodInfoLeft {
    width: 250px;
    float: left;
    padding-top: 10px;
    }

    #prodInfoRight {
    width: 300px;
    float: left;
    }

    Adjust the widths to your needs and adjust the padding-top value of the left column until the main product image lines up with the text. Don't forget the clear at the end or you could cause your description to overlap your footer.

  4. #4
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    6,173
    Plugin Contributions
    0

    Default Re: need help with lay-out of image and text on product page

    Quote Originally Posted by koenvandamme View Post
    Also, I would like for the image and the text to start at the same height (again, see screenshot please).
    Ko,
    Question 2,
    Locate this:
    includes/templates/theme079/css/stylesheet_main.css

    #productMainImage, #reviewsInfoDefaultProductImage, #productReviewsDefaultProductImage, #reviewWriteMainImage {
    line-height:20px;margin-bottom:80px;
    margin-right:25px;
    margin-top:36px;
    text-align:center;
    }

    delete the highlighted red font above please


    includes/templates/theme079/css/stylesheet.css Add the declaration below to the following existing element: a img {border: none;}

    a img {border: none;
    margin: 0em 1.9em 0em 0em; }

    1. play with the red font above as you like

  5. #5
    Join Date
    Feb 2009
    Posts
    53
    Plugin Contributions
    0

    Default Re: need help with lay-out of image and text on product page

    Thank you both. Your answers were very clear so I managed to figure it out.

    Mind if I ask an other question? As you can see on the sceenshot, I added the 'recently viewed' module. However I would like to add some text between the image and the text. Do I also change this in the stylesheet somewhere?

  6. #6
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    6,173
    Plugin Contributions
    0

    Default Re: need help with lay-out of image and text on product page

    Ko,
    I will take a look
    Last edited by haredo; 5 Mar 2009 at 04:46 PM.

  7. #7
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    6,173
    Plugin Contributions
    0

    Default Re: need help with lay-out of image and text on product page

    Ko,
    You are welcome

  8. #8
    Join Date
    May 2005
    Location
    Topanga CA
    Posts
    63
    Plugin Contributions
    0

    Default Re: need help with lay-out of image and text on product page

    Quote Originally Posted by pjb923 View Post
    This is a problem that I always had with the stock product info page. My solution is to create 2 columns. In the tpl_product_info_display.php file of your template, you will need to wrap the main product image in a div and float it left, and then wrap the remaining items that you want to appear in the right column in another div, also floated left.

    <div id="prodInfoLeft">
    <!--bof Main Product Image -->
    ...
    </div>

    <div id="prodInfoRight">
    <!--bof Product Price-->
    ...
    <!--bof Product description -->
    ...
    </div>

    <br class="clearBoth" />


    Then your stylesheet add.

    #prodInfoLeft {
    width: 250px;
    float: left;
    padding-top: 10px;
    }

    #prodInfoRight {
    width: 300px;
    float: left;
    }

    Adjust the widths to your needs and adjust the padding-top value of the left column until the main product image lines up with the text. Don't forget the clear at the end or you could cause your description to overlap your footer.
    This worked so great! Thank you!

 

 

Similar Threads

  1. Page lay out problem
    By melissamiller8 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 8 Aug 2011, 11:52 PM
  2. Lay Out problems - please help !
    By MDpodjetje in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 16 Sep 2009, 11:13 PM
  3. Lay-out problem with columns, only in IE
    By koenvandamme in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 9 Jun 2009, 09:16 AM
  4. page lay out
    By bradyhooks in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 23 Feb 2008, 10:08 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR