Forums / Templates, Stylesheets, Page Layout / Category image and category name text align problem.

Category image and category name text align problem.

Views: 1,658

Results 1 to 9 of 9
18 Sep 2012, 10:05 PM
#1
marknew avatar

marknew

Zen Follower

Join Date:
Oct 2005
Posts:
274
Plugin Contributions:
0

Category image and category name text align problem.

Hi, I am trying to get the category name to align centered to the category image on my category listing page - here

http://jurassiclures.com.au/index.php?main_page=index&cPath=1

I want them to look the same as i have them on the product info pages

http://jurassiclures.com.au/index.php?main_page=product_info&cPath=1&products_id=9

It uses <div id="categoryImgListing" class="categoryImg"><?php echo zen_image(DIR_WS_IMAGES . $categories_image, '', SUBCATEGORY_IMAGE_TOP_WIDTH, SUBCATEGORY_IMAGE_TOP_HEIGHT); ?></div>

Anyone know how to fix this one?

Thanks

18 Sep 2012, 10:36 PM
#2
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,857
Plugin Contributions:
18

Re: Category image and category name text align problem.

Well, first of all, it got listed in the css as div.categoryImg versus .categoryImg.
You will probably need to add .categoryImg img to the css to control the image and the text differently.
You are aware that not everybody has the bangers font installed on there machine. This could affect the look no matter what you do.

Also, you seem to have built your template by editing files in the classic folders. This will come back to haunt you on upgrade. The classic is there to not only show what a basic cart looks like but, also, it gives a safety net you can use to test your cart if you have problems down the road. The template_default files are used if files of the same name are not found in the custom template. Classic and default aren't really designed to "talk" to each other as you are doing. It's not a huge project to correct that, but it WILL be a huge project at upgrade time.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

18 Sep 2012, 11:21 PM
#3
marknew avatar

marknew

Zen Follower

Join Date:
Oct 2005
Posts:
274
Plugin Contributions:
0

Re: Category image and category name text align problem.

Thanks, yeh I know I'll need to sort the templates out but I inherited this and need to get it up quickly. I'll come back later and sort the templates. Bangers is a google web font and so doesn't need to be installed on the users machine.

I have this in my css. Are you saying it needs something else?

.categoryImg {
font-size: 3.6em;
color: #0f70a8;
align: middle;
font-family: bangers;

}

19 Sep 2012, 1:17 AM
#4
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,857
Plugin Contributions:
18

Re: Category image and category name text align problem.

That only controls the text. If you want to control the text and the image, you'll need to add the .categoryIMG img call which will control the images in the .categroyIMG area.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

19 Sep 2012, 6:04 AM
#5
marknew avatar

marknew

Zen Follower

Join Date:
Oct 2005
Posts:
274
Plugin Contributions:
0

Re: Category image and category name text align problem.

OK thanks. So i need to add this?
.categoryIMG img {

}

20 Sep 2012, 5:48 AM
#6
marknew avatar

marknew

Zen Follower

Join Date:
Oct 2005
Posts:
274
Plugin Contributions:
0

Re: Category image and category name text align problem.

What would I need to add to .categoryIMG img so the text and image aligns?

20 Sep 2012, 2:15 PM
#7
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,857
Plugin Contributions:
18

Re: Category image and category name text align problem.

Can't tell you much until you add it to the stylesheet. Right now, the tr td img you added to the end of the stylesheet is controlling it now.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

20 Sep 2012, 10:01 PM
#8
marknew avatar

marknew

Zen Follower

Join Date:
Oct 2005
Posts:
274
Plugin Contributions:
0

Re: Category image and category name text align problem.

Iv'e added
.categoryIMG img {

}

now. Does that help? Thanks

21 Sep 2012, 2:02 AM
#9
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,857
Plugin Contributions:
18

Re: Category image and category name text align problem.

My bad. Should have been #categoryImgListing img instead.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com