$(document).ready(function() {
//Botones de la comida
var bon = document.getElementById('boton1');
bon.addEventListener("click", agregar1);
var bona = document.getElementById('boton2');
bona.addEventListener("click", agregar2)
//Funciones para agregar la comida al recuadro en blanco
function agregar1() {
$('<p>Hamburguesa - 50 pesos </p>').appendTo('#preciosC');
}
function agregar2() {
$('<p>pizza - 100 pesos</p>').appendTo('#preciosC');
}
});
The container has a fixed height, the child elements of this container exceed this size so they overflow.
This is the default behavior, but you can override it with the css overflow property.
for example, if you want this container to have scrolling functionality, you can use
overflow: scroll
another way is to modify the behavior of the container, for example giving it the automatic height property and not limited to a size.