Home > Net >  How To Change Color Using CSS
How To Change Color Using CSS

Time:10-06

how do I change the colour using CSS?

 .container .input-group .opt-group   { 
     width: 100%;
     height: 100%; 
     border: 3px solid #ece5e5; 
     padding: 15px 20px; 
     font-size: 1rem; 
     border-radius: 30px; 
     background: transparent; 
     outline: none; 
     transition: .3s; 

} 
 <html>
  <body>
    <div class="container">
      <div class="input-group">
        <select class="opt-group" name="gender" id="gender" required type="">
          <option  disabled selected required value="">Choose Your Gender</option>  
          <option value="male">Male</option>
          <option value="female"> Female</option>
          <option value="other">Other</option>
        </select> 
      </div> 
    </div>
  </body>
  </html> 
After I applied CSS, it wouldn't change. What's the problem? Please give me a solution, and thanks in advance.

CodePudding user response:

change color of what? if text color is what you want then

color: red

add this to your css

CodePudding user response:

If you want to change the background color of the container you can use below

background: blue; or background-color:blue;

If you want to change text color

color: green ;

CodePudding user response:

I think you are asking for border color, because you have mentioned,

background: transparent;

If you want to change that, then use

background: "blue";
  • Related