1

I'm a Web developer.

I have one question about textarea default margin value.

http://jsfiddle.net/tTnCd/175/ This link is jsfiddler site.

I make CSS by

textarea {    
    position: absolute;
}
<textarea>tyjyjyj</textarea>

enter image description here

You can see a picture from an upper link.

Red checker is default margin on textarea that I say.

How to remove this white space?

Thanks!

김대희
  • 15
  • 3
  • 12

4 Answers4

2

try this

body {
    margin: 0;
}
Rajath Kumar PM
  • 655
  • 3
  • 9
0

If you inspect it in your browser via developer tools, you'll see that that's actually the default margin for the body. You'll want to remove your CSS and do what @Rajath Kumar PM suggested. :)

jayly
  • 156
  • 6
-1

this will do it

textarea {
    margin: 0;
    padding: 0;
}
  • This does not provide an answer to the question. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](https://stackoverflow.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/low-quality-posts/19041320) – Nick Mar 08 '18 at 07:41
  • It was asked in the question how to remove white spaces. The above code surely does what the developer asked for. – Ahsan Mirza Mar 09 '18 at 07:01
  • Thanks your answer! I changed body CSS margin~! – 김대희 Mar 09 '18 at 07:08
-1

There is concept of Reset CSS and normalize CSS. Please go through them. Here is the one nice explaination for that.

What is the difference between Normalize.css and Reset CSS?

Point 2 is try to avoid position absolute to make it to corner of the page. Absolute is not intended for that.It alters dimensions of the parent div.So please use absolute and fixed wisely and where it is intended to.

Pradeep
  • 140
  • 9
  • Who ever down voted the answer please add comment why you did that so it will be help full to improve my answer next time. Thanks. – Pradeep Mar 08 '18 at 07:34
  • Thanks a lot your answer! I changed CSS. But... I don't know who down vote..ㅠㅠ;; – 김대희 Mar 09 '18 at 07:07
  • Great if you found any useful information from the answer. And down vote is not an issue, If purpose is met.. Cheers. – Pradeep Mar 09 '18 at 07:24