is there anyway to make the textbox bigger than the text when using inline replace with jeditable. I want to give the user room to add new text on top of the existing text.
Set width of an input text box in HTML, CSS, and JavaScript 1 Set width in HTML In HTML, you can use the width attribute to set the width of an element. ... 2 Set width with CSS It is good practice to separate CSS from HTML markup. The idea is to define a class to set the width CSS property. ... 3 Set width with JavaScript
In HTML, you can use the widthattribute to set the width of an element. 1 2 3 4 5 6 <html> <body> <label for="name">Enter a value:</label> <input type="text"id="name"style="width: 200px;"> </body> </html> Edit in JSFiddle Alternatively, you can also use the sizeattribute to define the width of the <input>.
1. Set width in HTML. In HTML, you can use the width attribute to set the width of an element. Alternatively, you can also use the size attribute to define the width of the <input>. 2. Set width with CSS. It is good practice to separate CSS from HTML markup. The idea is to define a class to set width CSS property.
You can specify height
and width
in settings to set the textbox to specific height and width. There is also a function callback this did not work.onedit
which you can hookup to set specific size of edit box
<span id="edit">hello world!</span>
<script type="text/javascript">
$(document).ready(function(){
$("span#edit").editable("....",
{
event: "click",
style: "inherit",
onblur: "submit",
width:($("span#edit").width() + 200) + "px", // THIS DOES THE TRICK
height:($("span#edit").height() + 100) + "px", //THIS DOES THE TRICK
placeholder: "Click to set text",
tooltip: "Click to update"
});
});
</script>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With