Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / How to center image within sidebox?

How to center image within sidebox?

Locked

Views: 2,118

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
23 Nov 2009, 5:04 PM
#1
jo_h1971 avatar

jo_h1971

New Zenner

Join Date:
Oct 2009
Posts:
33
Plugin Contributions:
0

How to center image within sidebox?

Hoping someone may be able to help please.

If you take a look at my site www. h a z e l v a l l e y p a c k a g i n g .com, you will see that the crafty syntax image isn't centered. Although I have been using firebug and the web developers tools, I am still getting to grips with them and cannot locate the file that I will need to alter. Please could someone which file I need to alter and what i need to alter it to?

Many thanks

23 Nov 2009, 6:53 PM
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,091
Plugin Contributions:
56

Re: How to center image within sidebox?

In /includes/templates/cherry_zen/css/stylesheet.css, you could add

#craftysyntax img { margin-left: 20px; }

23 Nov 2009, 7:09 PM
#3
jo_h1971 avatar

jo_h1971

New Zenner

Join Date:
Oct 2009
Posts:
33
Plugin Contributions:
0

Re: How to center image within sidebox?

Hi

Thanks for the prompt reply.

Where specifically in the stylesheet would this need to be changed? Have tried adding it to the sidebox content and it didn't change anything?

Many thanks again for your help.

23 Nov 2009, 7:36 PM
#4
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,091
Plugin Contributions:
56

Re: How to center image within sidebox?

You can add it anywhere in the stylesheet.

23 Nov 2009, 7:59 PM
#5
jo_h1971 avatar

jo_h1971

New Zenner

Join Date:
Oct 2009
Posts:
33
Plugin Contributions:
0

Re: How to center image within sidebox?

Hi

Just a quick note to let you know that although I tried, I couldn't fix according to your solution. I found this file:

includes/templates/cherry_zen/sideboxes/tpl_blank_sidebox.php and changed this:

Line #12 : $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">';

to this:

$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent centeredContent">';

Thanks again for all your help and hope this provides a solution for someone!

1 Dec 2009, 4:23 PM
#6
gaffettape avatar

gaffettape

Zen Follower

Join Date:
May 2009
Posts:
433
Plugin Contributions:
0

Re: How to center image within sidebox?

jo_h1971:

hope this provides a solution for someone!

It did :smile:
I have been trying to sort this out for ages!!

Thanks

19 Jan 2010, 5:52 PM
#7
tracib avatar

tracib

Zen Follower

Join Date:
Oct 2007
Posts:
157
Plugin Contributions:
0

Re: How to center image within sidebox?

jo_h1971:

Hi

Just a quick note to let you know that although I tried, I couldn't fix according to your solution. I found this file:

includes/templates/cherry_zen/sideboxes/tpl_blank_sidebox.php and changed this:

Line #12 : $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">';

to this:

$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent centeredContent">';

I was looking for this same answer, and your solution fixed it!