开发者

How to make a Form Input Field Large?

开发者 https://www.devze.com 2022-12-24 15:48 出处:网络
For the form below, how could I make the input field big, like maybe 100 pixels in height by 400 pixels in length?

For the form below, how could I make the input field big, like maybe 100 pixels in height by 400 pixels in length?

Thanks in advance,

John

<form action="http://www...com/sandbox/comments/comments2.php" method="post"> 
    <input type="hidden" value="'.$_SESSION['loginid'].'" name="uid">  

    <div class="addaco开发者_StackOverflowmment"><label for="title">Add a comment:</label></div> 
    <div class="submissionfield"><input name="title" type="title" id="title" maxlength="1000"></div>  

    <div class="submissionbutton"><input name="submit" type="submit" value="Submit"></div> 
</form>


Any reason not to use a TEXTAREA form element instead?

<textarea rows="5" cols="80" id="TITLE">
</textarea>


you can avoid using the div by applying the class in the <input> itself

your CSS can be

.submissionfield { width: 90px; height: 390px; border: 1px solid #999999; padding: 5px; }


You can add css to the input, like:

.input-element{
font-size: 100px; // for say a select
width: 400px;
}

or you can add height but you might have to add !important to it...

.input-element{
height: 100px !important;
width: 400px;
}


Don't you need a textarea (example) field?


for better n bigger input field textarea is effective.

<textarea type="text"
name="pre_book_sugg"
class="form-control"
style="height: calc(2.5em + 4.75rem + 2px);"

>

//input value


You can also change the font-size in the css.
This will make the input boxes bigger, and allow for more readable text.

Chrome

CSS

form input{
    font-size: 2em;
}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号