How to fix the CSS code for the Form?

Solved

How to fix the CSS code for the Form?

ArafatWeb
Shopify Partner
11 1 6

Hi, 

I added a new field, the "Product Name" Dropdown on the Ride theme below: 

https://cybernightmarket.com/pages/contact

Can anyone give me the CSS code for this so that it looks better and can be adjusted with my existing theme? 


Arafat Web
Accepted Solutions (2)

BSSCommerce-HDL
Shopify Partner
2305 848 1065

This is an accepted solution.

Hi @ArafatWeb

Step 1: Go to Shopify Admin -> Online Store ->Theme -> Edit code

Step 2: Search file theme.liquid

Step 3: Insert this code above </head> tag:

 

<style>
select#\\\"product-name\\\" {
    margin-bottom: 20px;
    height: 50px;
    outline: none;
    box-shadow: none;
    background-color: transparent;
    font-weight: bold;
    color: #b0afbf;
    border: 1.5px solid gray;
}
</style>

 

Here is result:

BSSCommerceHDL_0-1726936164028.png

 

Hope this can help you,

If our suggestions are useful, please let us know by giving it a like or marking it as a solution. Thank you 😍

Sale banner, pop ups: Customize your sale banner, pop-ups and create countdown bar to boost conversion rate.
Simicart: Transform your Shopify store into a stunning and fully functional mobile app with just a few simple steps.
Product Labels & Badges:
Get more sales with striking labels, badges, and banners from our 10,000+ available templates.

BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now

View solution in original post

ArafatWeb
Shopify Partner
11 1 6

This is an accepted solution.

Here it is: 


<label for=\"product-name\">Product Name:</label>
<select name=\"product-name\" id=\"product-name\">
{% for product in collections.all.products %}
<option value=\"{{ product.title }}\">{{ product.title }}</option>
{% endfor %}
</select>


Arafat Web

View solution in original post

Replies 7 (7)

BSSCommerce-B2B
Shopify Partner
1790 548 608

@ArafatWeb ,  use this code at the end of base.css file

 

#\\\"product-name\\\" {
    background:  transparent!important;
    color: white!important
}
select#\\\"product-name\\\" option {
   color: #000!important
}

 

result:

BSSCommerceB2B_0-1726936080328.png

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now

BSSCommerce-HDL
Shopify Partner
2305 848 1065

This is an accepted solution.

Hi @ArafatWeb

Step 1: Go to Shopify Admin -> Online Store ->Theme -> Edit code

Step 2: Search file theme.liquid

Step 3: Insert this code above </head> tag:

 

<style>
select#\\\"product-name\\\" {
    margin-bottom: 20px;
    height: 50px;
    outline: none;
    box-shadow: none;
    background-color: transparent;
    font-weight: bold;
    color: #b0afbf;
    border: 1.5px solid gray;
}
</style>

 

Here is result:

BSSCommerceHDL_0-1726936164028.png

 

Hope this can help you,

If our suggestions are useful, please let us know by giving it a like or marking it as a solution. Thank you 😍

Sale banner, pop ups: Customize your sale banner, pop-ups and create countdown bar to boost conversion rate.
Simicart: Transform your Shopify store into a stunning and fully functional mobile app with just a few simple steps.
Product Labels & Badges:
Get more sales with striking labels, badges, and banners from our 10,000+ available templates.

BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now

exertweb
Tourist
24 7 3

@ArafatWeb 
Step 1: Go to Shopify Admin -> Online Store ->Theme -> Edit code

Step 2: Search file theme.liquid

Step 3: Insert this code above </head> tag:

 

 

<style>
.contact select {
    background-color: rgb(var(--color-background));
    color: rgb(var(--color-foreground));
    font-size: 1.6rem;
    width: 100%;
    height: 4.5rem;
    position: relative;
    margin: 0 0 25px;
    padding: 0 1.5rem;
    box-shadow: none;
    outline: none;
}
</style>

 

 

exertweb_0-1726936286482.png

 

Made4uo-Ribe
Shopify Partner
8446 2018 2478

Hi @ArafatWeb 

Check this one. 

From you Admin page, go to Online Store > Themes

Select the theme you want to edit

Under the Asset folder, open the main.css(base.css, style.css or theme.css)

Then place the code below at the very bottom of the file.

 

.contact .field {
    margin-top: 20px;
}

select#\\\"product-name\\\" {
    border: none;
    box-shadow: none;
}

select#\\\"product-name\\\" option, select#\\\"product-name\\\" {
    background:#1f1f21;
    color: rgb(var(--color-foreground));
    width: 100%;
    padding: 1.5rem;
}


select#\\\"product-name\\\"::after,select#\\\"product-name\\\"::before, select#\\\"product-name\\\" {
    border: .1rem solid transparent;
    border-radius: var(--inputs-radius);
    box-shadow: 0 0 0 var(--inputs-border-width) rgba(var(--color-foreground), var(--inputs-border-opacity));
    transition: box-shadow var(--duration-short) ease;
}

 

And Save. 

result:

Made4uoRibe_0-1726936885016.png

Made4uoRibe_1-1726936901685.png

 

 

 

Please don't forget to Like and Mark Solution to the post that helped you. Thanks!

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free.
Need THEME UPDATES but has custom codes? No worries, contact us for affordable price.

ArafatWeb
Shopify Partner
11 1 6

Can you do this for the page below as well? 

https://www.nukit222.com/pages/contact

I want the same dropdown on the page, the liquid, and the CSS code. 

Thanks so much!

 
Arafat Web
ArafatWeb
Shopify Partner
11 1 6

This is an accepted solution.

Here it is: 


<label for=\"product-name\">Product Name:</label>
<select name=\"product-name\" id=\"product-name\">
{% for product in collections.all.products %}
<option value=\"{{ product.title }}\">{{ product.title }}</option>
{% endfor %}
</select>


Arafat Web
BSSCommerce-B2B
Shopify Partner
1790 548 608

@ArafatWeb , Change your code to this one

 

<div class="grid__item input-full">
<label for=\"product-name\">Product Name:</label>
<select name=\"product-name\" id=\"product-name\">
{% for product in collections.all.products %}
<option value=\"{{ product.title }}\">{{ product.title }}</option>
{% endfor %}
</select>
</div>

 

 And add this code before </head> in "theme.liquid" file

 

<style>
label[for="\\\"product-name\\\""], #\\\"product-name\\\" {width: 100%}
</style>

 

Result: 

BSSCommerceB2B_0-1726938659511.png

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now