Opencart - Align text on specials/featured

Area to discuss all forms of website,design, commerce etc.
Post Reply
User avatar
Justin
Site Admin
Posts: 12090
Joined: 23 Jan 2026, 13:12
Location: Derbyshire
Has thanked: 11 times
Been thanked: 9 times
Contact:

Re: Opencart - Align text on specials/featured

Post by Justin »

Could some kind member point me in the right direction please? On my home page, http://www.printshetland.com/ The text does not centre to the images for special/featured items. Just wondered if someone could tell me exactly where the line is that changes this save me searching?
User avatar
daviddeer
Posts: 286
Joined: 24 Aug 2010, 23:03
Contact:

Re: Opencart - Align text on specials/featured

Post by daviddeer »

you could look here
The real secret is to wisdom is to listen to the wise and follow their advice
Skye
Posts: 187
Joined: 18 Oct 2013, 11:19
Contact:

Re: Opencart - Align text on specials/featured

Post by Skye »

Try the theme's stylesheet.css file.

Looks like it's set using padding attribute on ".box-product .name" and ".box-product .price". Set padding options to 0px and see if it fixes it..................
User avatar
WePrintForYou
Posts: 84
Joined: 17 Jul 2013, 08:57
Contact:

Re: Opencart - Align text on specials/featured

Post by WePrintForYou »

stylesheet.css

you have extra padding in

.box-product .name {
/* padding-left: 40px; */
/* padding-right: 5px; */

user chrome and inspect element to debug on the fly
Large Format, Sublimation, Direct To Garment Wholesale Manufacturer. No Minimums
spongerobinson
Posts: 470
Joined: 21 Feb 2013, 22:32
Contact:

Re: Opencart - Align text on specials/featured

Post by spongerobinson »

Exactly as WePrintForYou says

Change padding-left to 0px, and padding-right to 0px.

Also, to centre the price, change

.box-product .price {padding-left:58px;}

to padding-left:0px;

Should end up with the below.

vB_ID:3174
vB_ID:3174
Screen Shot 2015-01-07 at 13.13.43.jpg (20.97 KiB) Viewed 1 time
User avatar
Justin
Site Admin
Posts: 12090
Joined: 23 Jan 2026, 13:12
Location: Derbyshire
Has thanked: 11 times
Been thanked: 9 times
Contact:

Re: Opencart - Align text on specials/featured

Post by Justin »

Said if before, you guys are the best! Just what I needed, straight to the right section, changed, job done. Save me a fair bit of time, many thanks! :-)
User avatar
WePrintForYou
Posts: 84
Joined: 17 Jul 2013, 08:57
Contact:

Re: Opencart - Align text on specials/featured

Post by WePrintForYou »

I'm not sure what theme you are using but most themes have a custom CSS option where you can input CSS code that soft codes it into your website instead of hard coding like this.
Large Format, Sublimation, Direct To Garment Wholesale Manufacturer. No Minimums
User avatar
Justin
Site Admin
Posts: 12090
Joined: 23 Jan 2026, 13:12
Location: Derbyshire
Has thanked: 11 times
Been thanked: 9 times
Contact:

Re: Opencart - Align text on specials/featured

Post by Justin »

User avatar
WePrintForYou
Posts: 84
Joined: 17 Jul 2013, 08:57
Contact:

Re: Opencart - Align text on specials/featured

Post by WePrintForYou »

This is a plugin, 3 of the themes I use for different sites have their own control panel with a section like this in.

It does not make any difference just easier for testing.
Large Format, Sublimation, Direct To Garment Wholesale Manufacturer. No Minimums
User avatar
Justin
Site Admin
Posts: 12090
Joined: 23 Jan 2026, 13:12
Location: Derbyshire
Has thanked: 11 times
Been thanked: 9 times
Contact:

Re: Opencart - Align text on specials/featured

Post by Justin »

Aha, I understand, I'll look into that further, not something I've seen i don't think....other than VQMod etc. Many thanks :-)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest