I have a form with two rows of text boxes. The first row contains three text boxes, while the second row should only have one text box that spans 100% of the width. Here is the current code:
<div class="row">
<div class="col-md-4">
<label>First Name</label><br />
<asp:TextBox runat="server" ID="fName" CssClass="textboxsizeLarge borderText" ></asp:TextBox></div>
<div class="col-md-4">
<label>Middle Name</label><br />
<asp:TextBox runat="server" ID="MdName" CssClass="textBoxSizMd borderText" ></asp:TextBox></div>
<div class="col-md-4">
<label>Last Name</label><br />
<asp:TextBox runat="server" ID="lname" CssClass="textboxsizeLarge borderText" ></asp:TextBox></div>
</div>
<div class="row">
<div class="col-md-12">
<label>Address1</label><br />
<asp:TextBox runat="server" ID="address1" CssClass="borderText textboxsizebig" ></asp:TextBox></div>
</div>
The issue I am facing is that the address1 text box is only expanding to 40% of the screen width instead of the intended 80%. I am utilizing Bootstrap for this layout.
Here is an example screenshot showing the display of the address1 text box:
https://i.sstatic.net/7MjsM.png
I want the address1 text box to align with the beginning of the Last Name text box.
Below is the CSS styling I am using:
.textboxsizeLarge{
width:60%;
}
.textBoxSizMd {
width: 30%;
}
.textboxsizebig {
width: 100%;
}
.borderText {
border: 1px solid black;
padding: 1px;
}
In case Bootstrap is not functioning correctly, here is how I have included it in my site.master page. If any additional modifications are needed in the site.master page, please advise. Below is a snippet and the complete code follows:
<body>
<form runat="server">
<asp:ScriptManager runat="server">
<Scripts>
<%--To learn more about bundling scripts in ScriptManager see https://go.microsoft.com/fwlink/?LinkID=301884 --%>
<%--Framework Scripts--%>
<asp:ScriptReference Name="bootstrap" path="~/Scripts/bootstrap.js" />
<%--Site Scripts--%>
</Scripts>
</asp:ScriptManager>
Here is the full site.master page content:
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="IdentityCheckApp.SiteMaster" %>
<!DOCTYPE html>
<html lang="en">
<head runat="server">
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title><%: Page.Title %> - My ASP.NET Application</title>
<asp:PlaceHolder runat="server">
<%: Scripts.Render("~/bundles/modernizr") %>
</asp:PlaceHolder>
<webopt:bundlereference runat="server" path="~/Content/css" />
<link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<link rel="stylesheet" type="text/css" media="all" href="Content/Site.css" />
</head>
<body>
<form runat="server">
<asp:ScriptManager runat="server">
<Scripts>
<%--To learn more about bundling scripts in ScriptManager see https://go.microsoft.com/fwlink/?LinkID=301884 --%>
<%--Framework Scripts--%>
<asp:ScriptReference Name="MsAjaxBundle" />
<asp:ScriptReference Name="jquery" />
<asp:ScriptReference Name="bootstrap" path="~/Scripts/bootstrap.js" />
<asp:ScriptReference Name="WebForms.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebForms.js" />
<asp:ScriptReference Name="WebUIValidation.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebUIValidation.js" />
<asp:ScriptReference Name="MenuStandards.js" Assembly="System.Web" Path="~/Scripts/WebForms/MenuStandards.js" />
<asp:ScriptReference Name="GridView.js" Assembly="System.Web" Path="~/Scripts/WebForms/GridView.js" />
<asp:ScriptReference Name="DetailsView.js" Assembly="System.Web" Path="~/Scripts/WebForms/DetailsView.js" />
<asp:ScriptReference Name="TreeView.js" Assembly="System.Web" Path="~/Scripts/WebForms/TreeView.js" />
<asp:ScriptReference Name="WebParts.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebParts.js" />
<asp:ScriptReference Name="Focus.js" Assembly="System.Web" Path="~/Scripts/WebForms/Focus.js" />
<asp:ScriptReference Name="WebFormsBundle" />
<%--Site Scripts--%>
</Scripts>
</asp:ScriptManager>
<div><h1 class="h1top"></h1></div>
<div class="d-flex align-items-top px-5 mb-3">
<img src="images/azx.png" class="logo mr-3" />
<h4>test company</h4>
</div>
<div><h1 class="h1bottom"></h1></div>
<div class="container body-content">
<asp:ContentPlaceHolder ID="MainContent" runat="server">
</asp:ContentPlaceHolder>
</div>
</form>
</body>
</html>
Your assistance on solving this issue would be greatly appreciated.