How can I ensure that these input fields line up perfectly with this image, eliminating any gaps in between?

I am looking to add MAP PO and choose the status directly underneath the input fields above, with no empty space in between. The image is causing a disruption in the continuity of the flow.

Here is the image:

https://i.sstatic.net/pHnfJ.png

Answer №1

Feel free to utilize this snippet of code:

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4" crossorigin="anonymous">

<div class="row">
   <div class="col">
   <form>
  <div class="form-row">
    <div class="form-group col-4">
      <label for="inputState">Select Hardware</label>
      <select id="inputState" class="form-control">
        <option selected>Choose...</option>
        <option>...</option>
      </select>
    </div>
    <div class="form-group col-4">
      <label for="inputCity">Serial Tag</label>
      <input type="text" class="form-control" id="inputCity">
    </div>
    <div class="form-group col-4">
      <label for="inputZip">Assset No.</label>
      <input type="text" class="form-control" id="inputZip">
    </div>
  </div>
    <div class="form-row">
    <div class="form-group col-4">
      <label for="inputCity">Map No</label>
      <input type="text" class="form-control" id="inputCity">
    </div>
    <div class="form-group col-4">
      <label for="inputState">Slect Status</label>
      <select id="inputState" class="form-control">
        <option selected>Choose...</option>
        <option>...</option>
      </select>
    </div>

  </div>
</form>
   </div>
   <div class="col-auto">
     <img src="http://via.placeholder.com/150x150" alt="" />
   </div>
</div>

Answer №2

To provide a more accurate solution, it would be helpful to see your code.

One suggestion is to add position: relative to both MAP PO and Select Status, along with their input fields (you can enclose them in a <div> and apply the position to the container).

By doing this, you can utilize properties like top, bottom, margin-top, and margin-bottom to adjust the positioning.

For more information on positioning, you can refer to: https://www.w3schools.com/css/css_positioning.asp.

It is recommended to use relative units like % and em for positioning to achieve a responsive layout.

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

Placing text beside an image

I am brand new to osCommerce and recently took over this code. We are looking to improve the layout of the new_products page. Here is the current display code: div class="contentText"> <div class="NewProductsList"> <table border="0 ...

Ways to reduce the width of an input field: Utilizing Bootstrap v5 or employing CSS techniques

I am struggling to find a way to adjust the width of the input window. It seems like there is no specific code that controls the width of the input window. The code snippet below is extracted from the Bootstrap v5 documentation, specifically focusing on th ...

Using a pseudo-element after to center CSS content

Although there are numerous posts discussing this topic, my situation is unique. In my case, I have a collection of colors represented by circles. When I click on a circle, I add content in the form of a check mark by including a class selector with an af ...

How can I confirm that all elements have been properly reset to their original positions prior to making any further adjustments to them?

In need of some creative brainstorming, I'm working on a website design featuring ten overlapping cards. When the mouse hovers over a card, it expands while others move away. My goal is for each card to return to its original position once the cursor ...

If additional content has been included in the `div`, be sure to scroll all the way down to view it

I have a div that needs to automatically scroll to the bottom when new content is added. This is a common feature in chat applications where the user wants to see the latest messages without having to manually scroll down each time. How can I achieve this ...

Handling image errors in jQuery for responsive design queries

Images on my website change based on the screen size using media queries. I am looking for a way to handle errors that may occur using jQuery. I want to display a text message if the image fails to load. Here is the code I have so far: <div class="con ...

Issues with implementing Dark mode in TailwindCSS with Nuxt.js

After spending a couple of days on this, I'm still struggling to get the dark mode working with Tailwind CSS in Nuxt.js. It seems like there might be an issue with the CSS setup rather than the TypeScript side, especially since I have a toggle that sw ...

Customize the default classes for DataGrid in Material UI

Attempting to customize the CSS properties in the "DataGrid" Material UI, specifically adjusting font weight and overflow of the header. Below is the JSX code snippet: import React, {useState, useEffect} from 'react'; import {DataGrid, GridToolb ...

Tips for making a Google Map API Element fit perfectly in a Bootstrap column below a heading

I've spent countless hours trying to solve this on my own, scouring the internet for answers with no luck. I'm hoping someone here can spare a few moments to help me out. Much appreciated! I'm attempting to make the Google Maps API element ...

The hover effect fails to function properly after altering the background color. The default color setting is transparent

<button class="button-main slide">Slide Left</button> .button-main{ color: black; outline: none; background: transparent; border: none; letter-spacing: 0.0625em; padding: 8px 10px; text-transform: uppercase; font: b ...

Element failing to adhere to CSS grid layout

I am currently working with grid layout and aiming to position the following content at the bottom and center, but it is currently aligning to the left: .body { margin: 0; background-color: rgb(255, 237, 237); display: grid; grid-template-rows: ...

Tips for implementing an image placeholder in an AngularJS project

I have a search input box and I want to change the placeholder text "Search here" to an image. Is this possible? code <input id="autoComplete" type="text" ng-model="selected" typeahead="task.name for task in taskList | filter:$viewValue | limitTo:20" ...

How about trying out the magic of Bootstrap columns?

My issue pertains to bootstrap columns. Whenever I zoom in on the browser, the columns start overlapping and the text from col-md-7 ends up over the image. Does anyone know of a solution to this problem? <div class="row"> <div class="col-md-5 ...

Spring Boot application on Prime Faces is not displaying CSS after deployment to Heroku

I'm currently using a combination of Spring 3.1.3, Prime Faces 3.4.2, Hibernate 3.6.8, and Pretty Faces 2.0.4. When I deploy my application on a local server (Apache Tomcat 7), the CSS displays properly. However, when I deploy the same project to Her ...

Refresh PHP Calculator Display Once Results are Shown

Currently working on a basic calculator project coded in HTML, CSS, JS, and PHP. Here is a glimpse of it: The user input retrieval is handled by JS, while the actual calculations and result display are taken care of by PHP. I am striving to clear out the ...

Choosing between setting a height of 100vh versus a minimum height of 100vh

In the development of my app, I noticed an interesting issue. When I set the background on the html with a height of 100vh and resize the viewport to cause vertical overflow, the background does not cover the overflowed content: html { height ...

Is there a way to include a button within the Rails code that would allow users to add a present using the <%= link_to_add_fields "Add A Gift", f, :presents %> function

I'm having trouble figuring out how to insert a button into a link_to_add_fields, like this: <%= link_to_add_fields "Add Another Item", f, :items %> while working on my Rails App. I've attempted to include class: "btn btn-mini btn-info" ...

Is there a way to generate inline block elements that occupy the full 100% width? Furthermore, can the second element contain an additional element that is revealed upon

Currently, I am working on a project that involves displaying images with text overlays. The text overlays are designed as inline blocks with varying background colors. One issue I encountered is that there is unwanted whitespace between the background co ...

Why Changing the Width of a Flexbox Container Doesn't Impact Its Children?

Attempting to use TweenLite to animate the width of the blue sidebar down to zero, however facing an issue where the content breaks outside the parent's bounds. https://i.stack.imgur.com/4rEVr.png It is unusual for this to happen with Flexbox, given ...

Dealing with problems in col-md display on tablet devices

When viewing on Full Screen and mobile, the ranges panel (class="col-md-3") displays correctly. However, on tablet screens, the left column is obscured by the youtube image panel (class="col-12 col-md-9"). I have attempted various adjustments to the div s ...