Jump to content

Issue with custom css with select element in a form

Recommended Posts

Site URL: https://www.technologytrainedbyteens.org/new-page-2

Hello,

I am trying to change the font of the select elements of the form using custom CSS (in my form, where it says January and 1), but I found a confusing result. When I was using the inspect element to find the class to change, I found this ".sqs-block-form .field-list select". The issue is that CSS classes cannot have a space in it. As it is, when I paste those classes exactly into custom css, it does not work. But, when I had a hyphen in to make it ".field-list-select", and add a hyphen in using inspect element, it works fine. How could I make it so that it is permanently fixed?

Thanks for your help.

Link to comment
  • Replies 9
  • Views 458
  • Created
  • Last Reply

Top Posters In This Topic

13 minutes ago, dfeder said:

Site URL: https://www.technologytrainedbyteens.org/new-page-2

Hello,

I am trying to change the font of the select elements of the form using custom CSS (in my form, where it says January and 1), but I found a confusing result. When I was using the inspect element to find the class to change, I found this ".sqs-block-form .field-list select". The issue is that CSS classes cannot have a space in it. As it is, when I paste those classes exactly into custom css, it does not work. But, when I had a hyphen in to make it ".field-list-select", and add a hyphen in using inspect element, it works fine. How could I make it so that it is permanently fixed?

Thanks for your help.

Which one do you want to target to set style?

 

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
6 minutes ago, dfeder said:

I found this ".sqs-block-form .field-list select". The issue is that CSS classes cannot have a space in it.

Class names as well as other selector types don't have spaces but selectors do. When constructing a ruleset the selector is a hierarchy that tells the browser how to get to what you want to change. A kind of address if you will, like 1234 SE Any Street. 12 34 SE Any Street doesn't make sense but the former does.

CSS Ruleset Terminology

CSS selectors

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

This is the element when we select the field-list

image.thumb.png.25371ebe3106887ef9390069f909e923.png

Is it the one you want to target?

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
On 8/2/2022 at 7:15 AM, dfeder said:

i am trying to change the font of the elements circled in the picture

forums.PNG

Try adding to Home > Design > Custom Css

.form-item.field select {
  color: blue;
}

Hope it helps

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment

My testing

image.thumb.png.28a07ab86d40c459f263b2d11049d970.png

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment

Never mind, you good

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.