How can I remove the spacing between columns in a Bootstrap horizontal form?

Could you please review the following code:

<div class="container">
    <div class="row">
        <div class="col-xs-12">

        </div>
    </div>
    <div class="row">
     <form class="form-horizontal">
               <div class="col-md-3">
                    <input type="text" class="form-control input-lg" placeholder="Your Title">

                </div>


               <div class="col-md-3">
                    <input type="text" class="form-control input-lg" placeholder="Your Short Description">

                </div>

               <div class="col-md-3">

                    <input type="text" class="form-control input-lg" placeholder="Your Email Address">
               </div>

               <div class="col-md-3">

                    <button type="submit" class="form-control input-lg">Submit</button>
               </div>
            </form>
    </div>
</div>

I am facing an issue with the layout created by the above code. When the screen size reaches a point where the elements are displayed horizontally, I notice unwanted spacing between them. Upon investigation, it appears that the padding introduced by col-md-3 is causing this. How can I eliminate or reduce this spacing between each of the 4 controls?

Please refer to this link for a visual representation of the issue (pay attention to the horizontal space): Link

Answer №1

To apply CSS styling, simply add a class and define the properties as shown below:

.my-div{
 padding-left:0;
padding-right:0;
}

For the latest updates, please visit this link:

http://www.bootply.com/IZ53ewvxlj

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

Rotate image in Vue3 using @click

I have a dashboard with a refresh button that I want to rotate 360 degrees every time it is clicked. How can I achieve this rotation effect on the image with each click of the refresh button? Below is the code snippet I have been working on, but it only r ...

Why is my navigation bar not centered like the rest of the elements on the page?

Just trying to make everything centered and clean. Everything seems to be, apart from my nav bar at the top which seems to stick to the right? I can't figure out why? Thank you html .............. <div id="nav"> <ul> ...

Enhance the appearance of CardMedia in React Material UI with custom rendering options

I am curious about how I can customize the CardMedia component of React Material UI to achieve a design similar to this: https://i.sstatic.net/Spdbz.png In the desired result, there are 3 elements: The image itself in WebP format (see example) A dur ...

Guide on adjusting the size of an image based on either its width or height dimensions

Currently, I am retrieving product images from an API but unfortunately, they do not have consistent dimensions. My goal is to display these images within a 250x250 div. In some cases, the image is in portrait orientation and should be scaled based on its ...

How to eliminate the bottom border in react-native-material-dropdown

I recently integrated react-native-material-dropdown-v2 into my project using React Native. https://i.sstatic.net/aKVfi.png Is there a way to eliminate the bottom border in this material dropdown component? My React Native version is 0.62.2. ...

Creating a unique CSS style sheet tailored specifically for Internet Explorer and Microsoft Edge – here's how!

Struggling with internet explorer acting up and causing glitches on my website? Check out my problem here. The Issue: An interactive image on my website is not functioning properly in IE & Edge. The image should expand when hovered over, but glitches ...

Struggling to dynamically resize 2 boxes using JavaScript

I am attempting to create a layout with two Divs side by side, each containing slightly different content. I have successfully resized them equally using JavaScript, but the issue arises when loading the collapsed content as it does not adjust to the new s ...

Unable to input text in Vue.js text field

Recently, I encountered an issue while working on a new form using Laravel/Vue to input an address. Strangely, I found myself unable to type anything in the text input fields. Despite trying various solutions and seeking help from Google, the problem persi ...

"Having issues with Django not properly applying the JavaScript and CSS files I've linked in

I have completed my project and organized all the necessary files, including index.html, css, js, and settings.py within the appropriate folders. I am encountering an issue with applying a pen from the following source: CodePen index.html <!DOCTYPE h ...

Issues with the proper display of Bootstrap 4 in Django are causing problems

I am currently in the process of setting up Django to work with Bootstrap. Despite my efforts, I can't seem to get it functioning correctly and I'm unsure of where I may be making a mistake. Initially, I am just trying to display a panel. You can ...

Conceal sub-menu icons within the jQuery User Interface Menu Widget

Is there a way to hide the submenu icon for the jQuery UI menu widget? The default value is set to ui-icon-carat-1-e. $(document).ready(function(){ $(function() { $( "#menu" ).menu({ icons: { submenu: false ...

What is the best way to add shadow effects to a DIV using CSS?

Is there a way to add shadows within an element using CSS? I attempted the following method but it did not work: #element { shadow: 10px black; } ...

Creating a dynamic grid layout using a single unordered list (<ul>), with the help of CSS styling and possibly some JavaScript magic

Here is an example of my extensive HTML code, filled with links: <-- language: lang-html --> <ul> <li><a href="/link.html">Link1</a></li> <li><a href="/link.html">Link2</a></li> < ...

What are the recommended margins for various alphabets?

When displaying text, some alphabets take up more space than others. So how can I adjust the white space between elements '#re1' and '#re2' automatically in the scenario described below? In this code snippet, what is the best way to ad ...

What could be causing the failure of loading CSS images or JS in my Laravel project?

This is a continuation of my previous question where I managed to get the site up and running. Initially, all files including css, js, and images were loading properly. However, now I am encountering issues as the files are not loading and the console disp ...

Slider in MaterialUI featuring a vibrant spectrum of colors

Currently, I am delving into MaterialUI and my focus is on creating a range slider. I came across this example that I found useful: https://material-ui.com/components/slider/#range-sliders My goal is to assign different colors to the "high," "medium," and ...

When I hover over it, my play button refuses to show up

I am in the process of creating a music streaming website and I would like the play button to appear when hovering over a song. However, I am encountering an issue with the CSS section overriding the others that are meant for different parts (I am using Fo ...

Navigating the world of CSS with Razor

Utilizing Razor for the creation of a dynamic website, I have set up my _siteLayout.cshtml file where I defined the header, footer, and the body section to be replaced by @RenderBody() <header> </header> <section id="content" class=" clear ...

Is the imported style file not properly scoped?

Whenever I attempt to import a CSS file using this method, the styling is not properly scoped. Is it necessary to write the styles within a style tag for them to work correctly? I have been experimenting with this in Vue-cli. <style scoped> @im ...

Utilizing jQuery to trigger animations when the form is hovered over or when the input box is

I am currently working on implementing opacity effects for an entire form when it is hovered over or when an input box is clicked while the mouse cursor has moved away from the hover area, ensuring that the effect remains visible. Here is the HTML code I ...