Maintaining a padding inside of text-area

后端 未结 3 1046
礼貌的吻别
礼貌的吻别 2021-01-20 18:24

Inside of my textarea, I wish to maintain a padding of 30px from the top.

textarea {
    display: block;
    width: 300px;
    height: 50px;
    padding-top:         


        
3条回答
  •  面向向阳花
    2021-01-20 19:24

    I would remove all styling from the text area, and wrap it in a div that looks like a text area

    .wrapper { 
      border: 1px solid #aaa; 
      padding-top: 30px; 
    }
    
    textarea { padding: 0 }
    

    You might have to fiddle about with border radius etc, but that would maybe do it

提交回复
热议问题