How to fix the CSS code for the Form?

Solved

How to fix the CSS code for the Form?

ArafatWeb
Shopify Partner
12 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 835 910

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
12 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
1972 564 568

@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 835 910

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
Shopify Partner
37 12 8

@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

 

Amit

Made4uo-Ribe
Shopify Partner
10188 2418 3062

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 are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.

ArafatWeb
Shopify Partner
12 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
12 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
1972 564 568

@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