Skip to main content

Centre alignment in characteristics table

More
15 years 3 weeks ago #24983 by Jims
Hi, Nicolas.
See js-ca.net/potluckcms/index.php/catalogue.../category_pathway-13

The characteristic title is not centered on the table. I checked the style sheet and the alignment setting is "center". I also noticed in the page source code that the characteristic name is preceded by a lot of nbsp's ??

Also, how can I change the font on the "Contact us for more information" button?

Thanks

Jim

Please Log in or Create an account to join the conversation.

More
15 years 3 weeks ago - 15 years 3 weeks ago #24992 by nicolas
Hi,

The characteristic is not centered anymore because of the CSS:
.hikashop_product_characteristic_chooser td {
padding: 5px;
}
.hikashop_product_characteristics {
font-family: 'Nothing You Could Do', 'Yanone Kaffeesatz';
}

that you added. That breaks the centering.

having a padding of 8 instead of 5 will kind of center it.

The spaces are normal. They are there to add some padding before the characteristic name so that it is centered with the possibilities row below. Otherwise, it would be off on the left.

For the contact us button, you can do like that:
.hikashop_cart_input_button{
font-family: 'Nothing You Could Do', 'Yanone Kaffeesatz';
}
Last edit: 15 years 3 weeks ago by nicolas.

Please Log in or Create an account to join the conversation.

More
15 years 3 weeks ago #24999 by Jims
Thanks, Nicolas.

I made the font addition to the custon front end css, and checked it many times, but that font is not showing in the "contact us for more information" button. The css syntax works with no problem in the characteristics table??

Jim

Please Log in or Create an account to join the conversation.

More
15 years 3 weeks ago #25000 by nicolas
I made a mistake in my previous CSS, it should be:
.hikashop_cart_input_button{
font-family: 'Nothing You Could Do', 'Yanone Kaffeesatz';
}

Please Log in or Create an account to join the conversation.

More
15 years 3 weeks ago #25001 by Jims
nicolas wrote:

I made a mistake in my previous CSS, it should be:
.hikashop_cart_input_button{
font-family: 'Nothing You Could Do', 'Yanone Kaffeesatz';
}


Many thanks, Nicolas.

Jim

Please Log in or Create an account to join the conversation.

More
15 years 3 weeks ago #25094 by Jims
Apologies for revisiting this, Nicolas.

The lack of centering of the characteristic names in the table was botherng me and some reviewers,
js-ca.net/potluckcms/index.php/catalogue.../category_pathway-13
So I commented out the two elements that you mentioned as preventing the centering. But the text is still not centered in the characteristic table?

Any suggestions?

Thanks

Jim

Please Log in or Create an account to join the conversation.

More
15 years 3 weeks ago #25100 by nicolas
I see it centered (centered between the first characteristic name and the last, not centered on the table cell as for that you would have to remove the   ) on your link.

Please Log in or Create an account to join the conversation.

More
15 years 3 weeks ago - 15 years 3 weeks ago #25122 by Jims
Thanks, Nicolas.

Visually, it does look best when centred on the cell rather than on the values. The Colour label IS centered vertically on the cell and not on the values, so it would be good to be consistent.

Is there a code change in show.php that I could make to remove the &nbsp?

Jim
Last edit: 15 years 3 weeks ago by Jims.

Please Log in or Create an account to join the conversation.

More
15 years 3 weeks ago #25123 by nicolas
You would have to replace the line:
echo $this->characteristic->displayFE($this->element,$this->params);

by:
echo str_replace(' ','',$this->characteristic->displayFE($this->element,$this->params));

in the file show of the view product.

Please Log in or Create an account to join the conversation.

More
15 years 3 weeks ago #25126 by Jims
Thanks, very much, for that change, Nicolas.

I think the table looks so much better with that change.
I think I had better start to document (and backup) all these tweaks that I have been making or else I will lose them all when Hikashop is updated.

:-))

Jim

Please Log in or Create an account to join the conversation.

More
15 years 3 weeks ago #25127 by nicolas
If you do the modifications via the menu Display->Views, you won't loose them as the modifications are saved in a template override which is not updated. So we strongly recommend to do that via the interface and not directly in the files via FTP. That way, the update is more or less seamless.

Please Log in or Create an account to join the conversation.

More
15 years 3 weeks ago #25134 by Jims
Many thanks for that information, Nicolas.

I have been making all changes through Display Views, it is exactly how I've been making the changes so that's really good news.

So how do you manage things if, for example, an update contains changes to the show.php file where I have been tweaking the code?

Jim

Please Log in or Create an account to join the conversation.

More
15 years 3 weeks ago #25138 by nicolas
The original file is updated but not yours.
That means that you will keep your customization in place but that you might not get new features if we had to add code in the views you modified in order to add them.
If you don't need the new feature, then it's all fine you don't have anything to do. Otherwise, you might need to revert your changes and reapply them to the new version of the file.

Please Log in or Create an account to join the conversation.

Time to create page: 0.245 seconds
Powered by Kunena Forum