Changing a background-color

Joined
Aug 16, 2022
Messages
52
Reaction score
2
Hi Everybody,

I have a form, that is using Font-Awesome icons.


HTML:
<span class="input-group-text"><i class="fa fa-user fa-2x" style="background-color: #7DD4A8; color: #0000FF;" arial-hidden="true"></i></span>

Screenshot 2023-08-02 091510.jpg


As you can see, the colour of the icon is proper, the background-color is proper, but the icon is contained in a white box.
How can I change the colour of that white box to match the background-color?
 
Joined
Jul 4, 2023
Messages
366
Reaction score
41
As @BigDady said, check container e.g.
HTML:
<div class="row">
  <label for="name">
    <span class="input-group-text">
      <i class="fa fa-user fa-2x" style="background-color: #7DD4A8; color: #0000FF;" arial-hidden="true"></i>     
    </span>
  </label>
  <input type="text" id="name" name="name" placeholder="Enter Your Name">
</div>

<style>
  .row {
    display: flex;
    align-items: center;
    gap: .5rem;
    height: 2.5rem;
    width: 20rem;
    background-color: #7DD4A8; 
    padding: .4rem 1rem;
    border-left: .25rem solid orangered;
  }
  .row input {
    height: 2.5rem;
    padding: 0 .5rem;
  } 
</style>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,059
Latest member
cryptoseoagencies

Latest Threads

Top