jon.r
jon.r

Reputation: 1058

Need to enlarge text input bootstrap

I have been struggling with making the text input field 'txtProduct' larger. I have had some mild success but it seems the inline nature of the fields are prohibiting me from doing this properly using bootstrap. I'd imagine it's a simple fix but I am not a front end person. Please make any suggestions. I would like it to be something like col-md-10 or something around there...

Here is an image of what I currently have
I need the first text field much larger.

<div class="row">
        <div class="col-md-2"></div>
        <div class="col-md-8">
            <p class="lead">xxxxx</p>
            <form class="form-inline">
                <div class="form-group col-xs-push-10 col-md-pull-10">
                        <input class="form-control input-lg" id="txtProduct" name="txtProduct" type="text" placeholder="e.g. ALFALFA SPROUTS" autocomplete="on">
                    </div>
                <div class="form-group">
                    @Html.DropDownListFor(x => x.Markets, new SelectList(Model.Markets, "Value", "Text"), new { @class = "form-control input-lg" })
                </div>
                <button type="button" class="btn btn-primary btn-lg"><span class="glyphicon glyphicon-search"></span></button>
            </form>
          <div id="status" name="status"></div>
        </div>
        <div class="col-md-2"></div>
    </div>

Upvotes: 1

Views: 386

Answers (2)

hmjha
hmjha

Reputation: 489

You can try this for making input type text element font size enlargement.

input[type='text']{
 font-size: 20px;
}

Upvotes: 1

cssyphus
cssyphus

Reputation: 40030

This might do it. Either incorporate into your CSS file, or paste it in the body at top:

<style>
    .input-lg {font-size:2rem;padding:3px 7px;}
</style>

Experiment with font-size -- that is primarily what makes the input field larger, although you can also use height:2rem; and width:3rem; to size the field without changing text size.

Also, know the difference between px, em, rem and vw/vh in font-size. Lots of good explanation google-able, especially from css-tricks.com.

Upvotes: 1

Related Questions