Zen Cart Logo
Forums / Basic Configuration / Sub Category image not aligned

Sub Category image not aligned

Locked

Views: 1,565

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
12 Aug 2007, 1:09 PM
#1
Join Date:
Jun 2007
Posts:
12
Plugin Contributions:
0

Sub Category image not aligned

I am trying to set up my subcategories to have a background image. The image and the text do not align? Can someone point me in the right direction? The site I am working on is at https://www.intimate2u.com. This is the CSS entry that I am using.

A.category-subs, A.category-products, A.category-subs:visited, A.category-products:visited {^M
color: #FF0000;^M
text-decoration: none;^M
text-align: center;
display:block;
background: url(../images/intimate2ubuttonhover.gif) no-repeat left top;
height:20px;
margin: 0;
padding: 0px;
}^M
The text seems to be moved down at first glance but I am not so sure this is what is going on. When I added the background images to the categories using the same method I had to make a change to the tpl_categories.php file. I had to get rid of a <br /> in the line

  $content .= '' . "\n";

This used to be

$content .= '<br /> . "\n";

If you look at my site you will see the issue. I will leave it up like this for a short while!

Mike

12 Aug 2007, 1:40 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Sub Category image not aligned

Try editing this( highlighted) in the stylesheet making the margin statement as follows and adjusting as required

A.category-top, A.category-top:visited {
	color: #000000;
	text-decoration: none;
	text-align: center;
	display: block;
	background: url(../images/intimate2umenu.gif) no-repeat left top;
	height: 20px;
	margin-top: 3px;
	padding: 0px;
	}
12 Aug 2007, 1:44 PM
#3
Join Date:
Jun 2007
Posts:
12
Plugin Contributions:
0

Re: Sub Category image not aligned

No this leaves everything the same? :frusty:

12 Aug 2007, 1:48 PM
#4
Join Date:
Jun 2007
Posts:
12
Plugin Contributions:
0

Re: Sub Category image not aligned

[email protected]:

No this leaves everything the same? :frusty:
Actually this is the margin for the image not the text?

Mike

12 Aug 2007, 2:09 PM
#5
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Sub Category image not aligned

Using FF interactively the background images are not visible but the text does move does the background image also move?

12 Aug 2007, 2:13 PM
#6
Join Date:
Jun 2007
Posts:
12
Plugin Contributions:
0

Re: Sub Category image not aligned

kobra:

Using FF interactively the background images are not visible but the text does move does the background image also move?

Yes you are correct both the text and the image move together! I didn't notice this on the first try!

Mike

12 Aug 2007, 2:24 PM
#7
Join Date:
Jun 2007
Posts:
12
Plugin Contributions:
0

Re: Sub Category image not aligned

A.category-subs, A.category-products, A.category-subs:visited, A.category-products:visited {^M
color: #FF0000;^M
text-decoration: none;^M
text-align: center;
display:block;
background: url(../images/intimate2ubuttonhover.gif) no-repeat left top;
height:20px;
margin-top: 2px;
padding: 0px;
}^M
In my hast to post I posted the wrong piece of the CSS. This is the correct one.

Mike