2
I’m building an HTML page with some Divs, and inside one of them there is a input
and a button
. But when I zoom out, the Ivs stay aligned the right way, but the button and the input
come out of the div.
How do I make the button and the input
follow the div and don’t jump out?
<div id="search">
<form action="../php/CONSULTA.php" id="consulta" name="consulta" onsubmit="return validateFormC()" method="GET">
<b>Código para Consulta:</b>
<input type="text" name="CODIGOC" MAXLENGTH="13" size="11" value="" onkeypress="return Only_N(event)" />
<button type="submit" id="consulta" class="btnCons">CONSULTAR</button>
</form>
</div>
CSS
#search{
position:relative;
margin-top:3px;
margin-left:67%;
border:solid black 1px;
width:356px;
height:25px;
}
How do I set the size of a knob and input to CSS? I tried to set <input type="text" name="CODIGOC" MAXLENGTH="13" size="11%" value="" onkeypress="Return Only_n(Event)" /> but continued the same thing, when zooming out it exits the div.
– Thiago
Andrey, but this was neither a criticism nor a request. Maybe it’s not the answer he was looking for, but it was a response
– Dtag
@Thiago another thing that may be getting in the way is the
margin-left
, may be pushing the div too far to the left and changing the behavior http://jsfiddle.net/ws60qqev/– Dtag