Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

309
Views
How do I use CSS to properly hide a form select element, including the select arrow

I'm using display: none; in the style sheet to hide a number of form fields. When the user clicks the visible First Name or Last Name fields, the rest of the fields display using JavaScript getElementById to display block.

Everything works except the down arrow still displays from the select element when it should be hidden with everything else. I tried CSS:

select {
    appearance: none;
}

but that did not work. Image below of the problem and link here to the test page: Form Test Page

Test Page Screen

about 4 years ago · Juan Pablo Isaza
3 answers
Answer question

0

There is a :before psedo-element inside the select parent div. This is the arrow and not the select. enter image description here

about 4 years ago · Juan Pablo Isaza Report

0

Should be able to just set

.elementor-select-wrapper::before { display: none }

about 4 years ago · Juan Pablo Isaza Report

0

You have three main options:

CSS

i) display: none;

ii) visibility: hidden;

HTML

iii) hidden

Working Example:

select.b {
    display: none;
}

select.c {
    visibility: hidden;
}
<select class="a">
  <option>Option A1</option>
  <option>Option A2</option>
  <option>Option A3</option>
  <option>Option A4</option>
  <option>Option A5</option>
</select>

<select class="b">
  <option>Option B1</option>
  <option>Option B2</option>
  <option>Option B3</option>
  <option>Option B4</option>
  <option>Option B5</option>
</select>

<select class="c">
  <option>Option C1</option>
  <option>Option C2</option>
  <option>Option C3</option>
  <option>Option C4</option>
  <option>Option C5</option>
</select>

<select class="d" hidden>
  <option>Option D1</option>
  <option>Option D2</option>
  <option>Option D3</option>
  <option>Option D4</option>
  <option>Option D5</option>
</select>


Further Reading:

  • https://developer.mozilla.org/en-US/docs/Web/CSS/display
  • https://developer.mozilla.org/en-US/docs/Web/CSS/visibility
  • https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/hidden
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!