What is the correct way to align my checkboxes with their corresponding labels?

I have been working with HTML to make some adjustments to a website. I recently got feedback to change the label of my checkbox, however, it is now overlapping with another checkbox. How can I resolve this issue?

                                            <asp:CheckBox ID="crudAudit1" runat="server" TextAlign="Left" Text="<abbr title='Audit 1'>A1</abbr>" />
                                        </label>
                                    </span>
                                </div>
                                <div class="col-md-2 radioContainer">
                                    <span style="white-space: nowrap;">
                                        <label class="lblAudit2" id="lblAudit2" runat="server">
                                            <asp:CheckBox ID="crudAudit2" runat="server" TextAlign="Left" Text="<abbr title='Audit 2'>A2</abbr>" />
                                        </label>
                                    </span>
                                </div>
                                <div class="col-md-2 radioContainer">
                                    <span style="white-space: nowrap;">
                                        <label class="lblDispatched" id="lblDispatched" runat="server">
                                            <asp:CheckBox ID="crudisDispatched" runat="server" TextAlign="Left" Text="<abbr title='Disptached'>DIS</abbr>" />
                                        </label>
                                    </span>
                                </div>
                                <div class="col-md-2 radioContainer">
                                    <span style="white-space: nowrap;">
                                        <label class="lblScheduled" id="lblScheduled" runat="server">
                                            <asp:CheckBox ID="crudisScheduled" runat="server" TextAlign="Left" Text="<abbr title='Scheduled'>DEL SCH</abbr>" />
                                        </label>
                                    </span>
                                </div>
                                <div class="col-md-2 radioContainer">
                                    <span>
                                        <label class="lblFinal" id="lblFinal" runat="server">
                                            <asp:CheckBox ID="crudisFinal" runat="server" TextAlign="Left" Text="<abbr title='Final'>FNL</abbr>" />
                                        </label>
                                    </span>
                                </div>

After implementing this code, the checkboxes are displaying as follows on the website:

Screenshot showing how the checkboxes (DEL SCH) are overlapping with (FNL)

Answer №1

You may want to consider styling it in this manner.

<div class="col-md-3 checkboxGroup">
   <span style="text-decoration: underline;">
        <label class="finalLabel" id="finalLabel" runat="server">
             <input id="isFinalCheck" type="checkbox">
             FIN
        </label>
   </span>
</div>

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

Please reset the form fields after the most recent edit

I've created a form that includes multiple select elements. When an option is selected, it activates the next select element and updates it with values using Ajax and PHP. However, I'm facing an issue where changing a previous option only resets ...

What is the process for adjusting the width of an element using JavaScript?

I have a unique bar with one half red and the other green. I am trying to subtract 1vw from the width of the red section. Unfortunately, using style.width is not yielding the desired result. See below for the code snippet I am currently using: //FIGHT do ...

Creating a Triangle Slider Component with React and Material-UI (MUI)

Struggling with creating a price control using react js and MUI, similar to the image below: https://i.stack.imgur.com/ZP8oc.png I've searched online for libraries or solutions, but haven't found anything that works. ...

Guide on how to forward the response obtained from an Ajax call to a different HTML page

I am working with a mongoose database that stores data containing an individual's first and last name. The user inputs their first name into a field, triggering an ajax request sent to the file named controller.js. This file generates a JSON response ...

What could be causing the second image to not drop in the proper position in an HTML and JavaScript environment?

I am encountering an issue with a simple drag and drop implementation using images in my code. The first image works fine, but for some reason the second image does not display correctly when dragged inside the div boxes; it appears outside of the box. Can ...

Trigger an event when the menu is outside the viewport and then lock the menu to the top of the viewport

I am trying to create a menu element that remains fixed at the top of the browser viewport as the user scrolls, ensuring it is always visible. In my webpage layout, the menu sits below some text in the header initially. Once the user scrolls past the heade ...

"Exploring the Connection Between PHP, JSON, and

In my current class, we are collaborating on an android app project for our school. Due to the lack of physical meetings, I haven't had direct contact with some of my classmates. One member of the group has been responsible for programming the json an ...

Converting Latin numbers to Arabic using PHP

Looking for a way to convert English numbers to Arabic within specific elements in an HTML page using PHP? Here's my attempt at some code, but it ends up converting all numbers in the page. I only want to convert numbers between certain elements. Any ...

Unable to change Bootstrap variables within a Next.js project

I'm having trouble changing the primary color in Bootstrap within my NextJS project. I've tried different methods but nothing seems to work as expected. Here is the code snippet from my "globals.scss" file that I imported in "_app.js": $primary: ...

Is a CSS-only autoexpanding label possible within a list?

I am interested in having all the labels automatically expand to the size of the widest one. Below is the HTML structure: <div class="body"> <ul class="list"> <li> <span> <label>condition</label> ...

Accessing the name attribute of option tags in a controller: A guide

Within my blade file, the following code snippet is present: <select class="form-control" name="region_id_report"><option name="blank">No Region</option></select> Inside my controller, a variable named $regionidreport stores the v ...

Say goodbye to <!DOCTYPE html> when using htmlAgilityPack

I'm currently developing an app for WP 8.1, and one of the tasks I need to accomplish is parsing a webpage with the following structure: <!DOCTYPE html> <html> <body> <table cellspacing="0" cellpadding="0" border="0" style="b ...

My DIV elements are not adapting to the row and column breakpoints as expected. Can anyone help me understand why this is happening?

Currently, I am working on setting up a row of highlighted products on my website. It displays fine with 5 products on desktop view, but the challenge arises when it comes to viewing it on medium size devices where I want only 2 products to show, and event ...

Fixing the mobile display issue with react-responsive-carousel

I am relatively new to ReactJS and I am looking to develop a responsive Carousel. Here is the code snippet that I have currently: To achieve a responsive Carousel for both desktop and mobile devices, I utilized the react-responsive-carousel library. The ...

Retrieving addresses by extracting p from the Python class within a div

Currently the code: Extracts URLs for various gyms and saves them in a CSV file as shown below: https://www.lifetime.life/life-time-locations/al-vestavia-hills.html https://www.lifetime.life/life-time-locations/az-biltmore.html Desired functionality: I&a ...

Choosing jQuery over JQuery Mobile for a standard web application to effectively manage different devices

Creating a Unique Web Application In the works is a unique web application, similar to Trello, that divides a page into columns where tasks/cards can be added and moved between them. This desktop-focused platform will feature an information column on the ...

Tips for keeping buttons anchored at the bottom of the page during scrolling

As a newcomer to Ionic, HTML, and CSS, I am currently exploring how to keep a button fixed while scrolling through the page. Despite specifying a fixed position in the CSS, the button does not remain fixed as intended. The button seems to be having troubl ...

Open HTML Frameset in a new tab or window

I've been contemplating for the past week on how to address my issue using frameset. Situation: I have an html file for header, footer, menu, and content, each with its own background color. I implemented a frameset for enhanced design. The header ...

Ways to create a clickable red button

I'm working with bootstrap, CSS, and particle.js for this project. I have also linked a custom CSS file here. However, when I apply bootstrap and particle.js, the red color generate password button becomes unclickable. After checking in Chrome dev too ...

Creating a JavaScript object and retrieving the values of numerous input fields with identical classes

I have encountered an issue that I need assistance with: <input title="1" type="text" class="email"> <input title="2" type="text" class="email"> <input title="3" type="text" class="email"> The HTML code above shows my attempt to extract ...