22

I am about to post a question to Stack Overflow, but the page displays a warning about my question, "Questions with similar titles have frequently been downvoted and/or closed. Consider using a title that more accurately describes your question." My question is:

How do I edit the border color of a <select> element in Google Chrome?

I'm not sure how to rephrase that so it more accurately describes my question. It seems to me like it describes my question fairly accurately and specifically.

If it matters, the full text of my question is:

In this Codepen is a <select> element. When it is clicked in Google Chrome, a blue border appears around it (screenshot). How do I edit this color? I can't seem to find an applicable CSS selector/rule using Inspect Element.

The purpose of this question is two-fold:

  1. To learn more about this behavior--specifically, is it even possible to edit this particular element? If so, how would I approach it?

  2. The ultimate goal was to hopefully remove the border around the 'Location' drop-down menu on this page, on all browsers. But if is too difficult/complicated, I may just leave it as-is, and live with the slight variation across browsers.

13
  • I think that you are looking for this. But it seems that you are still learning about the technologies involved, and you may lack the proper vocabulary to ask a better quality question. Good luck.
    – yivi
    Commented May 17, 2018 at 13:45
  • 11
    It is a strong hint that it is probably a good idea to google first, using the title as a query. I see 21,200 hits on just SO. The top hit is a duplicate of a duplicate of a duplicate :) If you decide to ask anyway then be sure to tell why those duplicates did not help you. Commented May 17, 2018 at 14:10
  • 1
    @HansPassant before submitting a question, I typically review the previous questions suggested to me by Stack Overflow (screenshot: imgur.com/a/wAwrqvn). In this case, none of them seemed like they applied to my case. Are you saying it is recommended to also carry out a Google search for my question?
    – cag8f
    Commented May 18, 2018 at 3:26
  • @yivi Can you tell me what vocabulary in my question could be made more technical? First of all, there was a typo in the question I posted--it is meant to have read "<select> element" instead of "element" (I have fixed it in my original question. But other than that, how else can I make that a better quality question? Perhaps "border" is not the correct term?
    – cag8f
    Commented May 18, 2018 at 3:31
  • 3
    The main problem is that your question suggests that you "just" want to change the border of a <select> element. You don't. You specifically want to change it's border when the <select> has focus. This is likely why you were not able to find duplicates. The advice to use Google is valuable: the built-in search of Stack Overflow performs worse than Google's (which is fair, given that it is Google's core business to do search). Commented May 18, 2018 at 6:43
  • Nitpick: the link to your screenshot is broken (links to Codepen as well). Commented May 18, 2018 at 6:47
  • 2
    You should definitely include all the relevant code in the question itself. It will be close as off-topic otherwise. Links to off-site ressources can break which will render the question useless.
    – BDL
    Commented May 18, 2018 at 6:59
  • 1
    @cag8f, I meant to link you to this question, my bad. Doesn't that question (or the codepen I linked in my first message) resolve your issue?
    – yivi
    Commented May 18, 2018 at 7:05
  • @yivi I see your link and Codepen--thanks. But that still doesn't seem to answer my question. In that Codepen, I still can't change the outline of the elements I want. I'll keep researching.
    – cag8f
    Commented May 18, 2018 at 8:50
  • @Justastudent thanks for that--those were helpful comments about my question. I will adjust it to be more specific in that regards, thanks. Also thanks for pointing out the issue with the links.
    – cag8f
    Commented May 18, 2018 at 8:51
  • 2
    "Are you saying it is recommended to also carry out a Google search for my question?" Yes, indeed. And also perhaps search documentation applicable to the problem at hand. SO questions are supposed to be well-researched. Commented May 19, 2018 at 20:27
  • @cag8f Related: meta.stackoverflow.com/a/261593/2756409 - In short, yes you should definitely Google for the answer to your question before asking it here.
    – TylerH
    Commented May 20, 2018 at 0:48
  • Are you saying it is recommended to also carry out a Google search for my question No, it's not recommended, we expect you to do that. SO should be your last option, after all your searches did not help.
    – baao
    Commented May 20, 2018 at 10:55

1 Answer 1

38

After many helpful comments, I re-wrote my question as:

How do I change the border color of <option> elements when focused in Google Chrome?

When I did so, Stack Overflow suggested a new list of previous questions. One of them was identical to the question I was asking, so I followed it (down a path of duplicate questions) to a previous question that answered my question.

Thanks all for the help.

3
  • 20
    Oh, oh how I wish every newish user had your persistence and attitude. Good work. Commented May 18, 2018 at 14:16
  • 2
    Finally the "big red box" is useful for someone... +1. (and as a note, if you post an actual question don't just say "this codepen", include the code in the question itself)
    – user202729
    Commented May 19, 2018 at 10:00
  • 2
    @cag8f Thank you for making the effort to find the answer before posting your question! It is greatly appreciated. Oh and good job finding the answer as well!
    – TylerH
    Commented May 20, 2018 at 0:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .