Click here to Skip to main content
15,888,290 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I cant align my text input be the same with my image, cant seem to get it write. Please assist me thanks.

What I have tried:

<div data-="mainContent">
    <section class="container">
        <div class="logo col-sm-12 text-center col-md-12"> <img alt="" src="~/Images/eNtsa.png" /></div>
        <div class="clearfix"></div>

        <div class="innerContainer">
            <div class="row">

                <div id="MyWizard" class="formArea LRmargin">
                    @using (Html.BeginForm())
                    {
                        @Html.AntiForgeryToken()

                        <div id="divMessage" class="text-center col-md-5 col-md-offset-5 alert-success">
                            @Html.ValidationSummary()
                        </div>
                        <div class="glyphicon-log-out col-sm-17 text-center col-md-15"> <img alt="" src="~/Images/gcobani.jpg" /></div>
                        <div class="col-md-10 col-md-offset-10 col-xs-12">
                            <div class="loginPage panel-info">
                                <span class="">class="glyphicon glyphicon-user"></span>
                                <div class="form-group">
                                    @Html.TextBoxFor(model => model.username, new { @class = "form-control", autocomplete = "off" })
                                    @Html.ValidationMessageFor(model => model.username)
                                </div>




                                <div class="form-group">
                                    <span class="">^__i class="glyphicon glyphicon-user">Password</span>
                                    @Html.PasswordFor(model => model.password, new { @class = "form-control", autocomplete = "off" })
                                    @Html.ValidationMessageFor(model => model.password)
                                </div>
                            </div>

                            <div class="form-group">
                                <input id="BtnLogin" type="submit" class="btn btn-success btn-pressure" name="BtnLogin" value="Login" />
                                <input id="BtnReset" type="reset" value="Create" class="btn btn-info btn-pressure" name="BtnReset" value="Reset" />
                            </div>

                        </div>



                    }
                    <div class="clear"></div>
                </div>


            </div>


    </section>


</div>
Posted
Updated 20-Jan-20 23:15pm
v2
Comments
Richard Deeming 21-Jan-20 8:45am    
The Bootstrap grid has 12 columns; col-md-15 makes no sense, and won't have any effect.

Other than that, you haven't explained which image you're trying to align, and whether you're trying to center it horizontally or vertically.

Try creating a small JSFiddle[^] to demonstrate the problem.
gcogco10 21-Jan-20 9:06am    
I want my username and password text field be center and button, they are scewed left

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900