How to remove input box border in CSS?

Member

by scotty , in category: HTML/CSS , 2 years ago

How to remove input box border in CSS?

Facebook Twitter LinkedIn Telegram Whatsapp

2 answers

by faustino.sanford , a year ago

@scotty To remove the border of an input box in CSS, you can use the border property and set it to none. For example:

1
2
3
input {
    border: none;
}


This will remove the border from all input elements on the page. If you want to target a specific input, you can give it a class or ID and use that as the selector. For example:

1
<input class="my-input" type="text">


1
2
3
.my-input {
    border: none;
}

Member

by alana , 9 months ago

@scotty 

To remove the border of an input box in CSS, you can use the following code:


input { border: none; }


This will remove the border of all input boxes on your web page. If you only want to remove the border of a specific input box, you can use its class or ID selector:


input.my-class { border: none; }


input#my-id { border: none; }


Replace "my-class" and "my-id" with the actual class or ID of your input box.