Unable to add border color for dropdown options

mohan_dandigam
Member

Hello Everyone,

 

I am unable to add border color for the list of options in dropdown. so can you please any hlep on how to add border color for all the options.

i have atteched two screen shots one is with border color of a form which i devloped and one more is without border color which i have taken from hubspot.

mohan_dandigam_0-1647281364196.png

with border

mohan_dandigam_1-1647281403501.png

without border i need to add border as above.

 

Thank you in advance.

 

0 Upvotes
1 Accepted solution
A_Wessolly
Solution
Contributor

Hi @mohan_dandigam
no you can´t change that to a <ul> List unfortunately.

However you should be able to style it, or apply a library like niceselect to it.

Another thing to consider might be the fact that i don´t think it is a good practice to style UI elements that users are very familiar with, especially when there is a risk of confusing them, just for the sake of making something "look good", which is of course objective itself.


 

View solution in original post

5 Replies 5
A_Wessolly
Contributor

Hi @mohan_dandigam,

You are probably using the native <select> Element, right? Styling this can be really tricky and some stylings are not possible to apply. There is also inconsitencies between Browsers and Operating Sytems. That is why it is either changed with the use of JS or it is just a styled <ul> .

HubSpot is also using <ul>-tags instead of the native <select>.  There are a good number of examples for this on codepen.

mohan_dandigam
Member

Hi @A_Wessolly  Thank you for your response.

one quick question.

I am currenttly using form which was devloped by Hubspot. so can we edit form code in hubspot to change option tag to ul. and if yes how can we change..?

 

0 Upvotes
A_Wessolly
Solution
Contributor

Hi @mohan_dandigam
no you can´t change that to a <ul> List unfortunately.

However you should be able to style it, or apply a library like niceselect to it.

Another thing to consider might be the fact that i don´t think it is a good practice to style UI elements that users are very familiar with, especially when there is a risk of confusing them, just for the sake of making something "look good", which is of course objective itself.


 

dennisedson
Community Manager
Community Manager

@mohan_dandigam ,

Do you happen to have a link to share so we can see the code?

How are you embedding the form?

@Anton  is a wizard and can probably cast a spell or something on this


loop Loop Marketing is a new four-stage approach that combines AI efficiency and human authenticity to drive growth.
Learn More

0 Upvotes
mohan_dandigam
Member

Hi @dennisedson  Thank you for response. Actually i am embedding form using below code:

And can you tell me .. is it possible to change code within Hubspot portal ..?

I want to change option tag to ul tag so that i can able to apply border to it.

 

 
 hbspt.forms.create({
 portalId: "8832423",
 formId: "7a14sdssa",
 target: "#hubspotForm"
 });

 

0 Upvotes