- Posts: 111
- Thank you received: 0
How to center the button in shopping cart?
9 years 3 months ago #270913
by nunonog
How to center the button in shopping cart? was created by nunonog
-- url of the page with the problem -- :
www.portal-gestao.com
-- HikaShop version -- : 3.1.1
-- Joomla version -- : 3.7.2
Hello,
I'm trying to get the button on the shopping cart module in the center (see image).
However, it seems there is no div wrapping the "Finish order" button, so how can I create an override for this module and center the button?
Thanks!
-- HikaShop version -- : 3.1.1
-- Joomla version -- : 3.7.2
Hello,
I'm trying to get the button on the shopping cart module in the center (see image).
However, it seems there is no div wrapping the "Finish order" button, so how can I create an override for this module and center the button?
Thanks!
Please Log in or Create an account to join the conversation.
9 years 3 months ago #270930
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Replied by Jerome on topic How to center the button in shopping cart?
Hello,
Even if there is no div ; the button have a classname and you can use the "margin:0 auto" to center an element.
In the case that you really cannot find CSS to do what you want to do ; you will have to use view override.
Afterwards, I'm afraid that we do not have the required details to understand what button you're talking about so I don't know which view you're talking about exactly.
Please understand that CSS customization is outside the limits of support we can provide.
www.hikashop.com/support/documentation/1...the-display.html#css
Regards,
Even if there is no div ; the button have a classname and you can use the "margin:0 auto" to center an element.
In the case that you really cannot find CSS to do what you want to do ; you will have to use view override.
Afterwards, I'm afraid that we do not have the required details to understand what button you're talking about so I don't know which view you're talking about exactly.
Please understand that CSS customization is outside the limits of support we can provide.
www.hikashop.com/support/documentation/1...the-display.html#css
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
9 years 3 months ago #270959
by nunonog
Replied by nunonog on topic How to center the button in shopping cart?
Hello,
Thanks, you may see the class I'm using for this button in the image below.
It is the class for the template so it matches the site design.
Thanks for explaining how I can center the button.
Regards
Thanks, you may see the class I'm using for this button in the image below.
It is the class for the template so it matches the site design.
Attachment Capturar2.JPG not found
Thanks for explaining how I can center the button.
Regards
Please Log in or Create an account to join the conversation.
9 years 3 months ago #270961
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Replied by Jerome on topic How to center the button in shopping cart?
Hello,
We can see in your screenshot that the link ( a ) have a class name but most important, is within a DIV with a class name and even an ID !
So you can already do all you want to do on that link.
Regards,
We can see in your screenshot that the link ( a ) have a class name but most important, is within a DIV with a class name and even an ID !
So you can already do all you want to do on that link.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
9 years 3 months ago - 9 years 3 months ago #271005
by nunonog
Replied by nunonog on topic How to center the button in shopping cart?
Hello,
Thanks, you're right. I managed to target the a inside the div id.
The thing is: all the buttons in the site have the same style, and it with my (limited) knowledge of CSS, I can't center the button.
I tried:
And:
But nothing centers the button!
PS: Why is the button not centered by default?? This would allows all to not waste our time with this..
Thanks, you're right. I managed to target the a inside the div id.
The thing is: all the buttons in the site have the same style, and it with my (limited) knowledge of CSS, I can't center the button.
I tried:
Code:
#hikashop_cart_module .uk-button {
margin-left:auto;
margin-right:auto;
}
Code:
#hikashop_cart_module .uk-button {
position: relative;
margin: 0 auto;
}
#hikashop_cart_module .uk-button {
text-align: center;
}
PS: Why is the button not centered by default?? This would allows all to not waste our time with this..
Last edit: 9 years 3 months ago by Jerome. Reason: [code] tag is nice
Please Log in or Create an account to join the conversation.
9 years 3 months ago #271065
by nicolas
Replied by nicolas on topic How to center the button in shopping cart?
You can do like that:
and it will be centered.
It is not centered by default because modules buttons are not centered by default.
For example, the login module of Joomla: monosnap.com/file/8hpz88NNUy18zJAL6ai7YU2Ja24FTQ
So we respect that to be consistent. It's up to the Joomla template to style the buttons differently if needed.
Code:
#hikashop_cart_module .uk-button {
display:block;
margin-left:auto;
margin-right:auto;
width: 210px;
}
It is not centered by default because modules buttons are not centered by default.
For example, the login module of Joomla: monosnap.com/file/8hpz88NNUy18zJAL6ai7YU2Ja24FTQ
So we respect that to be consistent. It's up to the Joomla template to style the buttons differently if needed.
The following user(s) said Thank You: nunonog
Please Log in or Create an account to join the conversation.
Time to create page: 0.541 seconds