Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Sidebox content image placement problem

Sidebox content image placement problem

Locked

Views: 1,123

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
26 Jul 2010, 10:02 AM
#1
benlit2009 avatar

benlit2009

New Zenner

Join Date:
Jul 2010
Posts:
14
Plugin Contributions:
0

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 :)

26 Jul 2010, 11:13 AM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

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.

26 Jul 2010, 8:51 PM
#3
benlit2009 avatar

benlit2009

New Zenner

Join Date:
Jul 2010
Posts:
14
Plugin Contributions:
0

Re: Sidebox content image placement problem

Hi stevesh,

Thanks for the reply. Link below.

https://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 :)

26 Jul 2010, 11:38 PM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

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

<?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.
27 Jul 2010, 7:05 AM
#5
benlit2009 avatar

benlit2009

New Zenner

Join Date:
Jul 2010
Posts:
14
Plugin Contributions:
0

Re: Sidebox content image placement problem

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

27 Jul 2010, 9:17 PM
#6
benlit2009 avatar

benlit2009

New Zenner

Join Date:
Jul 2010
Posts:
14
Plugin Contributions:
0

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 :)

28 Jul 2010, 12:40 AM
#7
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Sidebox content image placement problem

You could add to your stylesheet something like```
#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/.
28 Jul 2010, 5:31 AM
#8
benlit2009 avatar

benlit2009

New Zenner

Join Date:
Jul 2010
Posts:
14
Plugin Contributions:
0

Re: Sidebox content image placement problem

Legend :)