Creating a Form in a Popup with Bootstrap

I have implemented Bootstrap on my website. Check it out at: hubb.tekkkz.com I am facing an issue where, when clicking on the login/register button on the right, the modal pops up. However, the user input elements within the modal are not taking up the full width of the parent container. This results in less spacing on the left side compared to the right.

How can I make sure that the elements span the entire width of the container/parent?

<div class="modal fade bs-example-modal-sm" id="loginModal" tabindex="-1" role="dialog" aria-labelledby="loginModal" aria-hidden="true">
    <div class="modal-dialog modal-sm">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true"><span class="glyphicon glyphicon-remove"></span></span></button>
                <h4 class="modal-title" id="exampleModalLabel">Login</h4>
            </div>
            <div class="modal-body">
                <form action="" method="post">
                    <p><input type="text" class="form-control" placeholder="Username" name="username" value=""></p>
                    <p><input type="password" class="form-control" placeholder="Password" name="password" value=""></p>
                    <p><input class="btn btn-primary form-control" type="submit" value="Login"></p>
                </form>
            </div>
        </div>
    </div>

Answer №1

Add a fresh style by creating a new class and applying it to the model inputs

.custom-form-control { 
width: 100% !important;
}

Answer №2

Insert the following CSS snippet:

#loginModal .form-inline .form-control,
#registerModal .form-inline .form-control {
  width: 100%!important;
}

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

The largest contentful paint is anticipating an unidentified event

My website is encountering issues with Google Pagespeed and I'm unsure of the cause. The primary bottleneck appears to be the LCP time, which Google reports as taking between 7 and 11 seconds during each test. Upon analyzing the waterfall chart, it ...

error in URI (not a valid URI):

Encountering an issue with a URI that is triggering a bad URI error. http://localhost:3000/api/v1/company_donations.json?token=foo&donation={&amount=101}&comment=Ordered The goal is to have the URL carry 2 attributes Token Donation obje ...

Discovering the ways to retrieve Axios response within a SweetAlert2 confirmation dialog

I'm struggling to grasp promises completely even after reviewing https://gist.github.com/domenic/3889970. I am trying to retrieve the response from axios within a sweetalert confirmation dialog result. Here is my current code: axios .post("/post ...

Updating a React component upon pressing a button to trigger a re-render

Currently, I am in the process of developing a React component that allows users to input an ID and retrieve relevant information upon submission. The code for this component is structured as follows: export default class IDContainer extends React.Componen ...

Is there a way to rearrange html elements using media queries?

Here is a snippet of code showcasing how my website is structured for both desktop and mobile views. Display on Desktop <body> <div> <header> <div>example</div> <a><img src"my logo is here"/& ...

Embedding images using a blob or base64 format does not function properly on iOS devices

I'm facing an issue with setting the src of an img tag to display an image. The code snippet below works fine on android, mac, and windows, but it is not functioning correctly on iOS: let base64Image = pageModel.image; this.$currentPageImage.src = `da ...

Is there a way to determine the actual time or percentage completion of a file upload using Telerik RadUpload?

Utilizing the Telerik upload file control with manager is a key component of my project: <telerik:RadUpload ID="RadUpload" Runat="server" MaxFileInputsCount="5" /> <telerik:RadProgressManager ID="RadProgressManager" Runat="server" /> For clie ...

Getting the total number of child elements in a web page using Selenium web-driver with Node.js

I've been looking everywhere, but I can't seem to find the answer Here's my HTML code: <form id="search_form_homepage" > ... <div class="search__autocomplete" style="display: block;"> &l ...

What are the benefits of incorporating various custom fonts through @font-face?

I feel like I must be overlooking something very simple. I have been using a single custom font with a normal font face: @font-face { font-family: CustomFont; src: url('CustomFont.ttf'); } Everything works perfectly when I use this font ...

The button event listener in React fails to trigger without a page refresh

Within my index.html file, I have included the following code snippet: <head> ... <script type="text/javascript" src="https://mysrc.com/something.js&collectorId=f8n0soi9" </script> <script ...

Variations in the appearance of scrollbars on the x-axis and y-axis within a single <div> element

Let's say we have a div element like this: <div class="nav-menu"></div> I want to customize the CSS style for scrollbar using the ::scrollbar pseudo-element: .nav-menu::-webkit-scrollbar { width: 8px; background: white; ...

I am having trouble properly positioning an icon next to its corresponding text within a menu item

I'm a newcomer to the world of HTML5 + CSS3 and I'm having trouble with aligning menus, text, and icons within the menu. Here's the issue: Each line of the menu consists of an icon and a text description. The problem is that they are too clo ...

Inserting items into an array entity

I am attempting to insert objects into an existing array only if a certain condition is met. Let me share the code snippet with you: RequestObj = [{ "parent1": { "ob1": value, "ob2": { "key1": value, "key2": va ...

Delaying the form submission with jQuery ajax

I am facing an issue with my jQuery AJAX code that automatically submits my form when it is changed. The problem arises when I have a country selection in the form, and clicking on an autocomplete suggestion results in the form being submitted with the o ...

Node.js route does not support io.sockets.on functionality

Incorporating io.sockets.on into a route within a Node.js and Express application is proving to be challenging. I have been following the guidance provided here: While I am able to successfully send io.sockets.emit events, I am encountering an issue with ...

A guide on dynamically showcasing/summoning icons in react by utilizing array data

QUESTION: 1 (SOLVED!) https://i.stack.imgur.com/1M1K7.png What is the best way to display icons based on an array of data codes? const data = [{ img: '01d' }, { img: '02d' }] if(data) { data.map((item) => ( <img src={`./ ...

Executing search bar capability through the use of AJAX and HTTP requests in JavaScript

I am currently working on implementing a search feature that will locate data based on the user's query. Specifically, I want to create a search bar in my HTML that can search for book titles stored in my database accessible through GET requests. Alth ...

Twilio Fax Reception: Blank Body Detected

I have embarked on my journey with Twilio's Programmable Fax API and successfully followed their getting started guide. However, upon receiving the fax, I encounter an issue where the request body appears as an empty object when logged to the console. ...

communicating global variables between Django and JavaScript

I want to make variables from my settings.py accessible in all JavaScript code used throughout my project. What is the best way to accomplish this elegantly? Currently, I am considering two options: Create a context processor and define these globals ...

How should one correctly trigger an event in Google scripts?

When it comes to calling in the active elements, I have been using event.source.getActive and SpreadsheetApp.getActive. However, I have noticed that I sometimes interchange them in my script and face issues. So, I am unsure about which method is more app ...