Product font size
17 posts
• Page 1 of 1
Product font size
When I originally typed in my product descriptions, I selected Comic Sans MS (large) every time and I noticed last week that this type face and size is only used hit & miss in my catalog so I changed it in
product.css and it still is using whatever the OpenCart default is for over half of my products. Is there somewhere else I need to change the code? And, why do some products have the type/size I selected and others do not? Thanks much and
HAPPY NEW YEAR TO EVERYONE !!!!!!

product.css and it still is using whatever the OpenCart default is for over half of my products. Is there somewhere else I need to change the code? And, why do some products have the type/size I selected and others do not? Thanks much and
HAPPY NEW YEAR TO EVERYONE !!!!!!

- dmbrownfield
- Posts: 89
- Joined: Thu May 08, 2008 4:37 pm
Re: Product font size
CSS is a powerful beast, but can be confusing the way that affected levels are cascaded.
For example
if you set all links to red in the default.css
a {
color: FF0000;
}
and then set product.css to have all green links
a {
color: 00FF00;
}
Then it would show red links up until the point where the product.css file was loaded in the middle of the page, which would override the red links to be green. So all links from that point on would be green. Normally, pages shouldn't load CSS in the middle like that so the last loading css would be the final override.
So you need to find which CSS affects the fonts that you want. Best way is to use FF's web developer extension and edit the CSS on the fly and see the outcome instantly (without actually changing anything permanently). Then mimic that change when you found it in the actual css file.
For example
if you set all links to red in the default.css
a {
color: FF0000;
}
and then set product.css to have all green links
a {
color: 00FF00;
}
Then it would show red links up until the point where the product.css file was loaded in the middle of the page, which would override the red links to be green. So all links from that point on would be green. Normally, pages shouldn't load CSS in the middle like that so the last loading css would be the final override.
So you need to find which CSS affects the fonts that you want. Best way is to use FF's web developer extension and edit the CSS on the fly and see the outcome instantly (without actually changing anything permanently). Then mimic that change when you found it in the actual css file.

Donate!|OpenCart Basics|GeoZones
Help me get more development cloud storage - Click Here to get DropBox
-

Qphoria - Administrator
- Posts: 18237
- Joined: Mon Jul 21, 2008 7:02 pm

Re: Product font size
Oh my gawd - this is going to be a VERY useful toolbar. Thanks and I'm sure you'll be hearing from
me when I get into using it .
me when I get into using it .

- dmbrownfield
- Posts: 89
- Joined: Thu May 08, 2008 4:37 pm
Re: Product font size
dmbrownfield wrote: And, why do some products have the type/size I selected and others do not? Thanks much and
If this is happening some where where you have a shorten description such as category display or
latest/featured/specials modules, it is a problem with how text is chopped.
You can't included formatting in text that is inadvertently chopped. It you chop the text before closing
tag, all the following tags are screwed up.
Just look at the source for your page that is not correct. It all the tags from the incorrectly displayed
item on are showing errors, it is because you have chopped the text before a closing tag.
Brent
-

bthirsk - Posts: 121
- Joined: Wed Sep 03, 2008 3:33 am
- Location: Canada
Re: Product font size
that does raise a good point. The description should be parsed to effect only the inner text. OR probably better would be to remove the formatting done by the fckeditor and make it match the format of the category page so that it flows better with that page, then when clicking on the product, it can use the designated format. This ensures that the tags are always controlled.

Donate!|OpenCart Basics|GeoZones
Help me get more development cloud storage - Click Here to get DropBox
-

Qphoria - Administrator
- Posts: 18237
- Joined: Mon Jul 21, 2008 7:02 pm

Re: Product font size
I think I have made that point before.
I think removing formatting from FCK editor is a regressive.
I handle output of description so it does not break the page.
Virtually every description I have has Bold, color, and other formatting.
I have over 1100 products on my autoparts store site, and no broken pages
that I know of.
I have a 1 line description in category, 3 line lines in latest/featured/specials,
and product description is handled by formatting routines.
If you want to look at it, I just posted a module for related products.
http://forum.opencart.com/index.php/topic,2160.0.html
It is located in library, application the file is string_modify.php
This file has routines to prevent HTML errors and allow formating to
be included in chopped descriptions.
I think we have an acceptable Editor in FCK, we just need to control the output.
I think removing formatting from FCK editor is a regressive.
I handle output of description so it does not break the page.
Virtually every description I have has Bold, color, and other formatting.
I have over 1100 products on my autoparts store site, and no broken pages
that I know of.
I have a 1 line description in category, 3 line lines in latest/featured/specials,
and product description is handled by formatting routines.
If you want to look at it, I just posted a module for related products.
http://forum.opencart.com/index.php/topic,2160.0.html
It is located in library, application the file is string_modify.php
This file has routines to prevent HTML errors and allow formating to
be included in chopped descriptions.
I think we have an acceptable Editor in FCK, we just need to control the output.
Brent
-

bthirsk - Posts: 121
- Joined: Wed Sep 03, 2008 3:33 am
- Location: Canada
Re: Product font size
maybe.. But you might have size 32 font on the product page. but You don't want that on the category page, as you'd want that to stay normal size to match the rest of the list.

Donate!|OpenCart Basics|GeoZones
Help me get more development cloud storage - Click Here to get DropBox
-

Qphoria - Administrator
- Posts: 18237
- Joined: Mon Jul 21, 2008 7:02 pm

Re: Product font size
Would you not still have that option.
If you want different font sizes on different pages,
format on the page and don't format in FCK editor.
But that should be the developers option.
If you change the code to remove all FCK Output to
strip tags and formatting, you have removed options,
making things too ridge.
If you want different font sizes on different pages,
format on the page and don't format in FCK editor.
But that should be the developers option.
If you change the code to remove all FCK Output to
strip tags and formatting, you have removed options,
making things too ridge.
Brent
-

bthirsk - Posts: 121
- Joined: Wed Sep 03, 2008 3:33 am
- Location: Canada
Re: Product font size
I suppose.
One problem I see tho is that if your truncated description lands on a tag. You can't very well close the table tag if the td and tr aren't closed and it might not even be in the right spot.
One problem I see tho is that if your truncated description lands on a














