Post by katapult » Sun Sep 05, 2010 2:32 am

Hi, I need to use long titles but there is following problem - buttons share, english and currency go to down line. Any suggestion How to correct it? Maybe to limit number of characters in title in header tpl. - but how?Thanks

wrong
Image

right
Image

New member

Posts

Joined
Fri Sep 11, 2009 5:17 am

Post by Purebeads » Sun Sep 05, 2010 5:15 pm

Go here:

/catalog/view/theme/default/

and copy the entire "default" directory structure to another name. In this case, I'll assume you copy it to "mytheme". You need to do this so that you can switch back to the default theme if you make mistakes in the code.

Then open this file:

/catalog/view/theme/mytheme/stylesheet/stylesheet.css

In there you will find the code that governs the appearance of the text and the spacing of the lines. You should be able to increase the height of the header bar in the center column. Other alternatives are that you can make the heading text lower case (so that more of it fits on a line), and you can also make it a smaller font size. However, that will affect the header style of the middle column on the cart's home page, and you may not want that.

Simply to give you an example of what you can do, if you go to my cart at http://www.purebeads.com/catalogue/ you will see that I put the text in lower case, I increased the font size in the middle column (as well as decreasing the font size of the modules in columns 1 and 3), and I changed the text color to blue.

I don't know PHP, but I figured out how to make changes simply by studying the code and experimenting. I'll do some experimenting and get back to you if I can figure it out.

====================

Okay, I just did some experimenting. You are presented with two problems: First, the product or "model" name appears in two places -- in the header bar and in the navigation "info" bar right above it (I don't know what else to call it). If the product name is too long, it pushes down the language and currency boxes to the right (and whatever that "Share" button is), and that interferes with the header bar. Assuming that there is a way to delete the information in the navigation "info" bar, the way to increase the size of the header bar is as follows:

In "stylesheet.css", search for the section of code identified by this:

#content .top h1

and increase the third pixel number to 25 or 30 (you should experiment with different numbers).

You then must find and alter the PNG graphic (or possibly several graphics) to make the gray header box appear taller. Those graphics can be found in this directory:

/catalog/view/theme/mytheme/image/

Exactly which image files you have to alter, I can't tell you.

When you change those graphics, the header box in the center column will be enlarged on the home page as well as on the product pages, and that may look a little strange.

However, if you can't find a way to keep the language and currency boxes from being pushed downward, there doesn't seem to be a solution to your problem. In truth, this is a bug, and the developers need to fix it so that very long product names can be used. The size of the header box is "hard-coded" insofar as it is a graphic which does not change with the content in the box. It appears that they use a graphic so that they can get that fading from white to light gray.

Is there any way at all that you can use shorter product names?

====================

I'm sorry for blabbing on so long, but something just occurred to me.

If you can find a way to delete the information in the navigation "info" bar right above the header, then that will give you more horizontal room for your product name. Even if it spills to two lines, your product name won't look so bad. Here is an example from my own site (which I created by doubling the text in the product name):

Image

If you simply change the text to lower case instead of all caps, and if you delete the info in the navigation "info" bar (so it doesn't push down the language and currency boxes into the header box), it doesn't look so bad if your product name goes to 2 lines, does it? I don't think so.

Active Member

Posts

Joined
Fri Apr 30, 2010 12:07 pm
Who is online

Users browsing this forum: No registered users and 12 guests