Hello,
I need some help with the search button alignment on small viewports. The site is version 1.0.8.4. It's modified. I've tried some CSS but not sure if I've tried everything. Here's what it looks like:
Need help with search button
- burt
- Core Team
- Posts: 4561
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy Me A Beverage
- Has thanked: 252 times
- Been thanked: 413 times
Re: Need help with search button
Looks like your search input is extending 100% pushing the button down.
Try an input group; https://getbootstrap.com/docs/4.6/compo ... ton-addons
Core example; https://github.com/CE-PhoenixCart/Phoen ... search.php
Try an input group; https://getbootstrap.com/docs/4.6/compo ... ton-addons
Core example; https://github.com/CE-PhoenixCart/Phoen ... search.php
I am not here to build for you.
I am here to build with you. Let's help each other.
I am here to build with you. Let's help each other.
-
lecarlb
- Contributor
- Posts: 316
- Joined: Mon Oct 26, 2020 5:26 pm
- Phoenix Version:
- Has thanked: 48 times
- Been thanked: 9 times
Re: Need help with search button
I tried the core example, no success. I'll post what I have in user.css that affects the input groupburt wrote: ↑Mon Oct 16, 2023 9:43 am Looks like your search input is extending 100% pushing the button down.
Try an input group; https://getbootstrap.com/docs/4.6/compo ... ton-addons
Core example; https://github.com/CE-PhoenixCart/Phoen ... search.php
Code: Select all
.input-group-append{
display: flex;
}
.input-group-append .btn-info {
position: relative;
z-index: 2;
background: #8a2be2;
border: 1px solid #8a2be2;
}
.input-group-append .btn-primary {
position: relative;
z-index: 2;
background: #8a2be2;
border: 1px solid #8a2be2;
}
.input-group-append .btn-outline-secondary {
background: #ffffff;
border: 1px solid #ffffff;
}
div.input-group input.form-control {
width: 400px;
}-
14Steve14
- Senior Contributor
- Posts: 923
- Joined: Fri Oct 25, 2019 7:01 pm
- Phoenix Version: v1.0.9.1
- Has thanked: 17 times
- Been thanked: 103 times
Re: Need help with search button
I have a vague recollection that some time ago on the old forum I was advised to add a negative margin or negative padding to the search button or the search box. The button then overlaid the search box.
I may be totally wrong as it was a while ago now.
I may be totally wrong as it was a while ago now.
- burt
- Core Team
- Posts: 4561
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy Me A Beverage
- Has thanked: 252 times
- Been thanked: 413 times
Re: Need help with search button
I'd just remove all that css and then see if it looks correct. Add one piece of the css back in and test again until it breaks. Then you know the problem.
Most likely the last one where you set width wider than the viewport.
Most likely the last one where you set width wider than the viewport.
I am not here to build for you.
I am here to build with you. Let's help each other.
I am here to build with you. Let's help each other.
-
lecarlb
- Contributor
- Posts: 316
- Joined: Mon Oct 26, 2020 5:26 pm
- Phoenix Version:
- Has thanked: 48 times
- Been thanked: 9 times
Re: Need help with search button
I thought about doing that but didn't act on it. I'll give it a try and report back.
-
lecarlb
- Contributor
- Posts: 316
- Joined: Mon Oct 26, 2020 5:26 pm
- Phoenix Version:
- Has thanked: 48 times
- Been thanked: 9 times
Re: Need help with search button
You were right @burt. After removing all the .css and reinserting them, I changed the width of div.input-group input.form-control from 400px to 200px and it worked.
Thank you.
Thank you.
- burt
- Core Team
- Posts: 4561
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy Me A Beverage
- Has thanked: 252 times
- Been thanked: 413 times
Re: Need help with search button
I think you could possibly remove that width setting completely and it would then auto adjust to full width. Try it?
I am not here to build for you.
I am here to build with you. Let's help each other.
I am here to build with you. Let's help each other.
-
lecarlb
- Contributor
- Posts: 316
- Joined: Mon Oct 26, 2020 5:26 pm
- Phoenix Version:
- Has thanked: 48 times
- Been thanked: 9 times