Zen Cart Logo
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 font size of product name?

how to change the font size of product name?

Locked

Started by lina0962 on 9 Apr 2007, 8:11 PM · Views: 4,956

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
9 Apr 2007, 8:11 PM
#1
lina0962 avatar

lina0962

Zen Follower

Join Date:
Jun 2006
Posts:
403
Plugin Contributions:
0

Post #1 by lina0962

Hello,

I want to make the font of product name is product listing page. The product name is the home page is much smaller than those in product listing page. I want to make all product name look the same. I tried everything in stylesheet but still don;t get the right one. Please help!

See what I mean by clicking http://www.loveinrose.com/index.php?main_page=index&cPath=127_136_131, See the above product name is much bigger. How to change?

Lina

10 Apr 2007, 1:48 PM
#2
jannik avatar

jannik

New Zenner

Join Date:
Apr 2007
Posts:
3
Plugin Contributions:
0

Post #2 by jannik

well, seeing I just solved that problem for myself I may very well share it with you ;)

The headers in the category listings are really the "h3" in the stylesheet. Howver, on the other pages "new products, all products" etc. they are NOT h3 - they're just regular hyperlinks. This is why you get different headers.

to set the h3 header exactly to your liking you can add the following to your main stylesheet (notice that h3 { font-size: 1.1em; } will already be there - you just need to change the font size to your liking)


h3 {
font-size: 1.1em;
}

h3 a:link {
color:#666666;
}
h3 a:visited {
color:#666666;
}
h3 a:active {
color:#000000;
}
h3 a:hover {
color:#000000;
}


I hope this helps!

- Jannik

10 Apr 2007, 4:05 PM
#3
lina0962 avatar

lina0962

Zen Follower

Join Date:
Jun 2006
Posts:
403
Plugin Contributions:
0

Post #3 by lina0962

Hello. Jannik:

Thank you very much for your valuable imput!! It works!!

Now I have a very small part that I still want to change. You see the product name is the product listing part is "bold", while the product name in the home page is "normal". How to make two of them the same, either both "strong" or both "normal"?

See what I mean by http://www.loveinrose.com/index.php?main_page=index&cPath=127_136_131

Thank you very much!

12 Apr 2007, 11:59 AM
#4
jannik avatar

jannik

New Zenner

Join Date:
Apr 2007
Posts:
3
Plugin Contributions:
0

Post #4 by jannik

Well Lina, that is fortunately quite easily achieved. The heading in the product listing is the h1 header, so simply make sure that the h3 and the h1 header has the same properties, like font-size: 1.1em and any text-decoration you may wish.

h1 {
font-size: 1.1em;
}

h2 {
font-size: 1em;
}

h3 {
font-size: 1.1em;
}

h3 a:link {
color:#000000;
}
h3 a:visited {
color:#000000;
}
h3 a:active {
color:#000000;
}
h3 a:hover {
color:#000000;
text-decoration: underline;
}

BTW: a little tip: using the View/Source in your browser may help you identify, which kind of formatting the different "items" use - for instance, I used it on the product listing page and found the following code, helping me identify the product heading as h1 (the product text is in Danish, don't let it bother you):

<!--bof Product Name-->

<h1 id="productName" class="productGeneral">Blomsterstativ</h1>
<!--eof Product Name-->

<!--bof Product Price block -->

<h2 id="productPrices" class="productGeneral">
400,00</h2>
<!--eof Product Price block -->

<!--bof free ship icon --> <!--eof free ship icon --> <!--bof Product description -->

<div id="productDescription" class="productGeneral biggerText">Flot hvidmalet stativ, højden er 130 cm.</div>
<!--eof Product description -->
<br class="clearBoth" />

This way it is also relatively easy for me to see that the price apparently uses h2 for it's formatting, while the description itself does not use a header, but instead a class and/or id. Now, i don't know much about css but now i at least know what to look for in the stylesheet :)

BTW: did you know that you can have separate stylesheets for each category (also called path)?

Hope it helps!

  • Jannik
12 Apr 2007, 1:44 PM
#5
lina0962 avatar

lina0962

Zen Follower

Join Date:
Jun 2006
Posts:
403
Plugin Contributions:
0

Post #5 by lina0962

Thank you Jannik! I followed your way and fixed the problem.

About separate stylesheets for each category (also called path), where can I download this mudule? Thanks a lot!!

18 Apr 2007, 7:51 AM
#6
jannik avatar

jannik

New Zenner

Join Date:
Apr 2007
Posts:
3
Plugin Contributions:
0

Post #6 by jannik

it's not a module you download. It's actually rather simple.

if you haven't already done so, go to catalog/includes/templates/classic and copy the entire css-folder into catalog/includes/templates/YOURWEBSITENAME/

for instance, my domain is unaluna.dk, so I've copied the css-folder into catalog/includes/templates/unaluna.

You can now, in catalog/includes/templates/(unaluna)/css make a copy of the stylesheet.css and rename it c_1.css -that will now be the your custom stylesheet for category 1, and any changes u make to it, like background color or image, will only affect category (or path) 1.

To make more separate stylesheets just copy the stylesheet.css again and rename it c_2.css etc.

If you want separate stylesheets for your other pages, like the contact_us page, you can just make a stylesheet in your custom css folder with the name contact_us.css, and the system does the rest for you.

If you want to see what I have made so far, go to www.unaluna.dk/catalog - the site is not yet active however.

I hope this helps!

  • Jannik

EDIT: corrected typo