Results 1 to 8 of 8
  1. #1
    Join Date
    Jul 2010
    Posts
    14
    Plugin Contributions
    0

    Default Sidebox content image placement problem

    Hi,

    Desperately trying to add an image succesfully within my sidebox but struggling to find the answers in tutorials and other posts. Can anyone please help.



    Im able to add the image by including the following within my sidebox template file.

    <img src="images/wales.jpg"/>
    <?php
    $content = "<BR>Take the A487 north from Aberystwyth. Turn left onto the B4572 towards Clarach. Left at Llangorwen, Clarach Cross. First right onto Nant Llan Industrial Estate.<BR><BR>";
    ?>

    The image though appears above the entire sidebox including header.

    How do I go about adding it above or below the content/text. (within the sidebox)

    Thanks. Ben :)

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: Sidebox content image placement problem

    You don't say what sidebox or provide a link to your site, but it may be easier to add the image as a background in the stylesheet.

  3. #3
    Join Date
    Jul 2010
    Posts
    14
    Plugin Contributions
    0

    Default Re: Sidebox content image placement problem

    Hi stevesh,

    Thanks for the reply. Link below.

    www.westwalesfibreglass.co.uk

    The sideboxs are blank ones I created just for text and a few images.

    Wouldn't adding the image on the stylesheet effect all the left or right sideboxs?

    The wales picture is currently above the header, Id like it below the header. Also Id like to place a picture below the text on the Delivery sidebox and another below the shopping cart.

    Finally feel like Ive made some progress with zencart but this been a brainache so I appreciate the support.

    Ben :)

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

    Default Re: Sidebox content image placement problem

    You are just outputting the image before constructing the sidebox. You need to put the image into $content:
    PHP Code:
    <?php
    $content 
    '<img src="images/wales.jpg"/><BR>Take the A487 north from Aberystwyth. Turn left onto the B4572 towards Clarach. Left at Llangorwen, Clarach Cross. First right onto Nant Llan Industrial Estate.<BR><BR>';
    ?>
    Also, you need to either use single quotes for the PHP string as shown, or escape the double quotes inside the <img> tag.

  5. #5
    Join Date
    Jul 2010
    Posts
    14
    Plugin Contributions
    0

    Default Re: Sidebox content image placement problem

    Excellent. Thanks gjh42. Think was the double quotes that were holding me up. Much appreciated. :)

  6. #6
    Join Date
    Jul 2010
    Posts
    14
    Plugin Contributions
    0

    Default Re: Sidebox content image placement problem

    Hi again. Got all my images in place bar one in the shopping cart sidebox. Any idea how i can place an image beneath the shopping cart content. Would like to place a payments accepted image. Thanks. Ben :)

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

    Default Re: Sidebox content image placement problem

    You could add to your stylesheet something like
    Code:
    #shoppingcartContent {
        padding-bottom: 69px;
        background: url(../images/yourpaymentsimage.gif) bottom center no-repeat;
        }
    Adjust to suit your situation. This will put the image at the bottom and clear enough space so the text doesn't cover it.

    Save the image in /includes/templates/your_template/images/.

  8. #8
    Join Date
    Jul 2010
    Posts
    14
    Plugin Contributions
    0

    Default Re: Sidebox content image placement problem

    Legend :)

 

 

Similar Threads

  1. removing the space between sidebox header image and content
    By davowave in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 14 Mar 2009, 12:19 AM
  2. Sidebox and Image Placement
    By davidc304 in forum Addon Sideboxes
    Replies: 5
    Last Post: 10 Jan 2008, 05:16 AM
  3. sidebox placement
    By MB1 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 14 Nov 2007, 05:35 AM
  4. Image in Categories Sidebox Content
    By aussiewench in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 15 Jan 2007, 04:18 PM
  5. Sidebox Content image margins
    By Lawbird123 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 18 Oct 2006, 10:08 PM

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