Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove text area border when focused on?

Tags:

html

css

I have managed to remove the text area border but I want it so the user cant see a border even when they click on it. This is my css as of yet.

.comments{
    border: 0 none #FFF;
    overflow: hidden;
}

I tried making the border transparent, I tried this also but it doesn't work either, also tried it with other attributes active etc.

.comments:focus{
    border: 0 none #FFF;
    overflow: hidden;
}

Is it possible to remove the border when focused on?

The border isn't visible until the textarea is clicked on btw. So border none does work

like image 642
Crouch Avatar asked Nov 30 '22 20:11

Crouch


2 Answers

You need to set outline:none for the textarea.

.comments:focus{
    border: 0 none #FFF;
    overflow: hidden;
    outline:none;
}

Js Fiddle Demo

like image 83
Sachin Avatar answered Dec 03 '22 10:12

Sachin


textarea, input { outline: none; }
like image 42
Sobin Augustine Avatar answered Dec 03 '22 09:12

Sobin Augustine