If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / How to change the padding / margins of the catergory links

How to change the padding / margins of the catergory links

Locked

Started by cienwen on 13 Nov 2007, 8:56 PM · Views: 4,328

Results 1 to 19 of 19
This thread is locked. New replies are disabled.
13 Nov 2007, 8:56 PM
#1
cienwen avatar

cienwen

New Zenner

Join Date:
May 2006
Posts:
37
Plugin Contributions:
0

Post #1 by cienwen

Hello Good Zenners,

Does anyone know how to fix this? I want to adjust the space between the Category Links but changing the padding and the margins does not seem to have an effect. I also want them to turn blue when hovered on. I did not have a problem adjusting the links in the Information section so I must be missing something here. I would like the Category links to layout like the information links.

Here is my CSS:

/* categories box parent and child categories */

a.category-top, a.category-top:visited  {
	color: #566373;
	width: 100%;
	margin: 0px 0px 0px 0px !important;
	padding: 0px 0px 0px 0px;
	background-image: none !important;
	display: block; 
	text-decoration: none;
}

a.category-links, a.category-links:visited  {
	color: #566373;
	width: 100%;
	margin: 0px 0px 0px 0px !important;
	background-image: none !important;
	text-decoration: none;
}

a.category-subs, a.category-subs:visited  {
	color: #566373;
	width: 100%;
	margin: 0px 0px 0px 0px !important;
	padding: 2px 0px 2px 0px;
	background-image: none !important;
	display: block; 
	text-decoration: none;
}

a.category-products, a.category-products:visited  {
	color: #566373;
	width: 100%;
	margin: 0px 0px 0px 0px !important;
	padding: 2px 0px 2px 0px;
	background-image: none !important;
	display: block; 
	text-decoration: none;
}

.catergory-top a:hover {
	background-color: #DEE4EC;
	text-decoration: none;
	width: 100%;
	height: 100%;
	margin: 0px 0px 0px 0px !important;
	padding: 2px 0px 2px 0px;
	background-image: none !important;
	display: block; 
}

.catergory-links a:hover {
	background-color: #DEE4EC;
	text-decoration: none;
	width: 100%;
	margin: 0px 0px 0px 0px !important;
	background-image: none !important;
}

.catergory-subs a:hover {
	background-color: #DEE4EC;
	text-decoration: none;
	width: 100%;
	margin: 0px 0px 0px 0px !important;
	padding: 2px 0px 2px 0px;
	background-image: none !important;
	display: block; 
}

.catergory-products a:hover {
	background-color: #DEE4EC;
	text-decoration: none;
	width: 100%;
	margin: 0px 0px 0px 0px !important;
	padding: 2px 0px 2px 0px;
	background-image: none !important;
	display: block; 
}

This is the store in its current, unfinished state.

http://www.evbantiques.com/store/index

Any help anyone may give would be much appreciated.

Cienwen

13 Nov 2007, 10:54 PM
#2
hem avatar

hem

Totally Zenned

Join Date:
Sep 2007
Location:
Dublin, Ireland
Posts:
1,281
Plugin Contributions:
5

Post #2 by hem

Get rid of the following line (highlighted in red):

a.category-top, a.category-top:visited {stylesheet.css (line 639)
background-image:none !important;
color:#566373;
display:block;
margin:0px !important;
padding:0px;
text-decoration:none;
width:100%;
}

Andrew

Andrew Moore
Omnicia Agile Development
www.omnicia.com

13 Nov 2007, 11:03 PM
#3
hem avatar

hem

Totally Zenned

Join Date:
Sep 2007
Location:
Dublin, Ireland
Posts:
1,281
Plugin Contributions:
5

Post #3 by hem

If you also get rid of color and text-decoration your hover will work too.

Andrew

Andrew Moore
Omnicia Agile Development
www.omnicia.com

14 Nov 2007, 1:44 AM
#4
cienwen avatar

cienwen

New Zenner

Join Date:
May 2006
Posts:
37
Plugin Contributions:
0

Post #4 by cienwen

Thanks for your help Hem, but I still seem to be missing something.

I removed the block and that tightens things up but I can’t get the padding effect. I could put 15,000px and it will not move. Also, I removed the text-decoration but my hover is still not working.

a.category-top, a.category-top:visited  {
	color: #566373;
	width: 100%;
	margin: 0px 0px 0px 0px !important;
	padding: 5px 0px 15px 0px;
}

.catergory-top a:hover {
	background-color: #DEE4EC;
	width: 100%;
	height: 100%;
	margin: 0px 0px 0px 0px !important;
	padding: 5px 0px 15px 0px;
}

This worked for my “Information” sidebox. Can you see what I am missing?:frusty:

14 Nov 2007, 2:02 AM
#5
jettrue avatar

jettrue

Totally Zenned

Join Date:
Jan 2005
Location:
USA, St. Louis
Posts:
3,651
Plugin Contributions:
5

Post #5 by jettrue

Cienwen:

Thanks for your help Hem, but I still seem to be missing something.

I removed the block and that tightens things up but I can’t get the padding effect. I could put 15,000px and it will not move. Also, I removed the text-decoration but my hover is still not working.

a.category-top, a.category-top:visited {
color: #566373;
width: 100%;
margin: 0px 0px 0px 0px !important;
padding: 5px 0px 15px 0px;
}

.catergory-top a:hover {
background-color: #DEE4EC;
width: 100%;
height: 100%;
margin: 0px 0px 0px 0px !important;
padding: 5px 0px 15px 0px;
}

> 
> This worked for my “Information” sidebox. Can you see what I am missing?:frusty:

I would first get rid of the styles you have embedded into your zen cart... even though you have them set to "hidden" you have them hidden with HTML "hiding" code, not hidden with css "hiding" code:

<style type="text/css">
<!--
a.category-top {
 color: #566373;
 padding: 0 0 8px 2px;
 text-decoration: none;
}
-->
</style>
14 Nov 2007, 2:34 AM
#6
cienwen avatar

cienwen

New Zenner

Join Date:
May 2006
Posts:
37
Plugin Contributions:
0

Post #6 by cienwen

Thank you for your assistance Jettrue.

I removed the embedded style from for the Category section. (I am leaving the embedded style for the Information section because it is working very happily)

I also stripped the CSS to its bare minimums and yet no change to the padding or the hover. Is there another selector I am missing?

a.category-top, a.category-top:visited  {
	color: #566373;
	width: 100%;
	padding: 5px 0px 15px 0px;
}

.catergory-top a:hover {
	background-color: #DEE4EC;
	width: 100%;
	padding: 5px 0px 15px 0px;
}
14 Nov 2007, 12:18 PM
#7
hem avatar

hem

Totally Zenned

Join Date:
Sep 2007
Location:
Dublin, Ireland
Posts:
1,281
Plugin Contributions:
5

Post #7 by hem

Your hover for that area is defined on stylesheet.css (line 31). Set the following: ```
a:hover, #navEZPagesTOC ul li a:hover, #navMain ul li a:hover, #navSupp ul li a:hover, #navCatTabs ul li a:hover {
background-color:#DEE4EC;
text-decoration:underline;
}

Andrew

Andrew Moore
Omnicia Agile Development
www.omnicia.com

14 Nov 2007, 6:31 PM
#8
cienwen avatar

cienwen

New Zenner

Join Date:
May 2006
Posts:
37
Plugin Contributions:
0

Post #8 by cienwen

Thank you for your continued help.

The spelling mistake, that was just stupid on my part. Very sad. When I fix it nothing changes.

Changing line 31 of the style sheet would make a universal change to the all the hovers in my store. My goal is to change the hover of the Category links in my left side box only so that they match the hover of my Information links. So the Category links (like the Information links are now) should have a blueish background when hovered, but all the other links in the center column should remain as they are now, underlined when hovered on.

I also need to add space between the Category links and the Category links only. It seems logical that adding padding to a.category-top should make changes. However nothing changes no matter what I add to this tag: not color, not spacing, nothing. :censored:

Does anyone know how to make changes to the Category links in the sidebox without changing links site-wide?

Thanks

15 Nov 2007, 9:01 AM
#9
hem avatar

hem

Totally Zenned

Join Date:
Sep 2007
Location:
Dublin, Ireland
Posts:
1,281
Plugin Contributions:
5

Post #9 by hem

Delete the line that says (near stylesheet.css line 31):

a:hover, #navCatTabs ul li

and create a new style:

a:hover, #navCatTabs ul li{
background-color: #DEE4EC;
}

Andrew

Andrew Moore
Omnicia Agile Development
www.omnicia.com

15 Nov 2007, 10:01 PM
#10
cienwen avatar

cienwen

New Zenner

Join Date:
May 2006
Posts:
37
Plugin Contributions:
0

Post #10 by cienwen

Thanks for your continused help Hem. It is solved now. I had to put the selectors at the very end of my style sheet and this worked.

/* categories box parent and child categories */

a.category-top, a.category-top:visited {
	color: #566373;
	padding: 2px 2px 2px 2px;
	line-height: 20px;
}

a.category-subs, a.category-subs:visited {
	color: #566373;
	padding: 2px 2px 2px 2px;
	line-height: 20px;
}

a.category-products, a.category-products:visited {
	color: #566373;
	padding: 2px 2px 2px 2px;
	line-height: 20px;
}

a.category-links, a.category-links:visited {
	color: #566373;
	padding: 2px 2px 2px 2px;
	line-height: 20px;
}

a.category-top:hover {
	background-color: #DEE4EC;
	text-decoration: none;
	padding: 2px 2px 2px 2px;
	line-height: 20px;
}

a.category-subs:hover {
	background-color: #DEE4EC;
	text-decoration: none;
	padding: 2px 2px 2px 2px;
	line-height: 20px;
}

a.category-products:hover {
	background-color: #DEE4EC;
	text-decoration: none;
	padding: 2px 2px 2px 2px;
	line-height: 20px;
}

a.category-links:hover {
	background-color: #DEE4EC;
	text-decoration: none;
	padding: 2px 2px 2px 2px;
	line-height: 20px;
}

I have been Zenned.

Thanks!:yes:

15 Nov 2007, 10:58 PM
#11
hem avatar

hem

Totally Zenned

Join Date:
Sep 2007
Location:
Dublin, Ireland
Posts:
1,281
Plugin Contributions:
5

Post #11 by hem

Good job- glad to see you nailed it.

Andrew

Andrew Moore
Omnicia Agile Development
www.omnicia.com

14 Dec 2007, 5:28 PM
#12
tacoma avatar

tacoma

Zen Follower

Join Date:
Dec 2007
Posts:
125
Plugin Contributions:
0

Post #12 by tacoma

Using firebug I got to see how you got the spaces between categories!

Thanks.

line-height:18px;

20 Dec 2007, 9:31 PM
#13
yenmax avatar

yenmax

New Zenner

Join Date:
Sep 2006
Posts:
89
Plugin Contributions:
0

Post #13 by yenmax

Hi
I like your website. My I ask how did you made a line under CATEGORIES and above the New products. Very appreciated if you can help

Thanks :cool:

20 Dec 2007, 10:32 PM
#15
yenmax avatar

yenmax

New Zenner

Join Date:
Sep 2006
Posts:
89
Plugin Contributions:
0

Post #15 by yenmax

Hi
Thank you for your fast reply. But what about the line under the title of the CATEGORIES which is a golden color on your website. How can I do that.
Please review me site www.yenmax.com


Thank

20 Dec 2007, 10:59 PM
#16
gjh42 avatar

gjh42

Black Belt

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

Post #16 by gjh42

The vertical knotwork divider? That is done with background-images in the stylesheet.

There is an image of a piece of twisted lines repeated along the right edge of #navColumnOneWrapper, a top end image on #navMainWrapper and a bottom end image on #information. The elements to apply this to will vary depending on what boxes you have in top and bottom positions.

The end images neatly cover the ragged ends of the line, and allow it to appear to stretch vertically.

	/* gjh42 4/27/06 */
#navColumnOneWrapper {
	margin: 0.5em 0 0.5em 0.5em;
	width: 200px;
	background-image: url(../images/borderside.gif);
	background-position:top right;
	background-repeat: repeat-y;
	} 
	
#navMainWrapper {
	margin: 0em;
	font-weight: bold;
	color: #000000;
	height: 1%;
	width: 100%;
	background-image: url(../images/borderside-top.gif);
	background-position: top right;
	background-repeat: no-repeat;
	}

#information {
	background-image: url(../images/borderside-bot.gif);
	background-position:bottom right;
	background-repeat: no-repeat;
	}
21 Dec 2007, 4:10 AM
#17
cienwen avatar

cienwen

New Zenner

Join Date:
May 2006
Posts:
37
Plugin Contributions:
0

Post #17 by cienwen

Yenmax,

I think you are referring to my site, right?

I have made the line under the Categories using the CSS stylesheet. I call the color Pumpkin. This was made for a client of mine. Here's the code:

.leftBoxHeading {
	margin: 35px 0 7px 0;
	background-color: #fff;
	border-bottom: 2px solid #D4A86C;
	padding: 0 0 4px 0;
	}
21 Dec 2007, 3:35 PM
#19
cienwen avatar

cienwen

New Zenner

Join Date:
May 2006
Posts:
37
Plugin Contributions:
0

Post #19 by cienwen

Pumpkin!!! :clap: