Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Textbox not taking full width

Posted on 2013-11-26
2
Medium Priority
?
2,309 Views
Last Modified: 2013-11-28
I am new to bootstrap 3 and I am using it in my asp.net application

I have created one login page.

I used a panel and put textboxes inside it.

The issue is the textboxes were not taking full width, I set it width=100% but nothing happens

I am not what mistake I am doing here.


here is the code

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="Documentation.Login" %>

<!DOCTYPE html>

<html>
<head runat="server">
    <title>Formulation Technology - Login</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="css/bootstrap.min.css" rel="stylesheet" />
    <link href="css/style.css" rel="stylesheet" />
</head>
<body>
    <form id="form1" runat="server">
        <div class="container">
            <div class="row top-buffer">
                <div class="col-md-2 col-md-offset-5">
                    <asp:Image ID="imgLogo" ToolTip="Formulation Technology" ImageUrl="~/images/fti_logo.png" runat="server" />
                </div>                
            </div>
            <div class="row top-buffer">
                <div class="col-md-7 col-md-offset-3">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h1 class="panel-title"><b>Log in</b></h1>
                        </div>
                        <div class="panel-body">
                            <div class="input-group">                              
                              <asp:Label ID="lblUsername" runat="server" Text="UserName" CssClass="control-label"></asp:Label>
                              <asp:TextBox ID="txtUsername" runat="server" CssClass="form-control" />
                            </div>
                            <br/>
                            <div class="input-group">                              
                              <asp:Label ID="lblPassword" runat="server" Text="Password" CssClass="control-label"></asp:Label>
                              <asp:TextBox ID="txtPassword" TextMode="Password" runat="server" CssClass="form-control" />
                            </div>
                            <br/>
                            <label class="checkbox">          
                                <asp:CheckBox ID="chkRememberMe" runat="server" Text="Remember Me" />
                            </label>
                                                        
                            <asp:Button ID="btnSubmit" runat="server" Text="Log in" CssClass="btn btn-lg btn-primary button300"  />
                            
                        </div>                              
                    </div>
                </div>
            </div>
        </div>
        <script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
        <script src="js/bootstrap.min.js"></script>
    </form>
</body>
</html>

Open in new window

1111.png
0
Comment
Question by:yadavdep
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 39678497
Need a live link or the css - html tells us nothing.
0
 
LVL 18

Accepted Solution

by:
Matthew Kelly earned 1060 total points
ID: 39683906
When a sub element is set to 100% width (like the text boxes) it will only expand to 100% of the width of the container element. In this case "input-group" contains the text boxes and those may be limited.

An easy way to see where things are is add

style="border:1px solid #000000;"

Open in new window


To the elements to see how big they are. I am assuming panel-body is what has the grey border that is as large as the "Log In" header, so likely the input-group div is not as wide as the panel-body.

Try expanding the input-group to be wider.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question