0
I started a project in HTML, CSS and Javascript and came across the following situation: when I create an input element in html it automatically skips a line in relation to the other elements, I would like to know a way for this input to be in the same line as the other two elements. (in this case, a label and a span).
const input = document.querySelector('input.command')
const dir = document.querySelector('span.dir')
let currentDir = "D:\\Users\\currentUser"
dir.innerHTML = currentDir
body{
background-color: #282A36;
color: #FFFFFF;
border: none;
font-size: 15px;
font-family: "Fira Code";
}
input.command{
color: #FFFFFF;
border: none;
font-size: 15px;
font-family: "Fira Code";
background-color: #282A36;
outline: none;
margin-left: 0px;,
text-align: center;
}
span, label{
color: #FFFFFF;
border: none;
font-size: 15px;
font-family: "Fira Code";
background-color: #282A36;
outline: none;
}
span, label, input{
display: inline-flexbox;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="style.css">
<title>Ice</title>
</head>
<body>
<span class="dir"></span>
<label class="incode"></label>
$<input class="command" size="123">
<script src="app.js"></script>
</body>
</html>
because it is a terminal, as you would to make it, when crossing the line boundary, it will display the text on the bottom line?
– joao.jlf4
In this case, it would have to be done in javascript to assign
width = 100%
when input X number of characters.– Pedro Henrique