1

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>

2 Answers 2

1

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.

Sign up to request clarification or add additional context in comments.

Comments

1

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

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.