D
D
David King2020-08-19 18:05:02
css
David King, 2020-08-19 18:05:02

Why does the input field go beyond the bounds of the container?

I'm writing here an adaptive web interface for the program, and BAM, a bunch of shit comes from where you didn't expect it! .text_area ( I know that text_area is a different type of input tag, but I don't give a shit ), decided to crawl outside of its parent... I tried all the Internet jokes, but nothing works. Help heal my hemorrhoids!!!

Here is the code:

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Ankhena, 2020-08-19
@javaScriptIsPooP

box-sizing: border-box

A
Andrey Shevkalyuk, 2020-08-19
@Enguipro

This is because of the padding property. You specified that the text_area's width should be 100% of the parent's width, but that's just the width of the text_area's content, and there's also padding that makes your block even larger. If you look at the box model of an element in the developer panel, it will immediately become clear.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question