What is the best way to eliminate the gaps between two tables?

Although it may seem like a straightforward issue, I am struggling to make it work. Despite browsing through numerous similar questions, I have not been able to find a solution.

Is there a way to eliminate the white space between two tables without resorting to a negative margin? I have experimented with various settings on both the table and body elements, such as:

margin:0;
padding:0;
display:block;

You can test it out using this fiddle: http://jsfiddle.net/sznurkqo/

Appreciate any help!

Answer №1

Check out the live DEMO here

If you are experiencing extra space in your layout, it may be due to the .table class having a margin-bottom of 20px.

.table {
  width: 100%;
  margin-bottom: 20px;
}

To fix this issue, simply adjust the margin-bottom value to 0px like so:

.table {
  width: 100%;
  margin-bottom: 0px;
}

Answer №2

In my situation, I discovered that

setting margin-bottom to -15px;

was effective.

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

center items after aligning floats

Currently, I am in the process of creating a website using a mobile-first approach with media queries. As I progressed to a larger device, specifically a tablet, I had to utilize the float property on my .textcontainer element to ensure it aligned properly ...

What is the best way to generate unique mousedown callbacks on the fly?

My goal is to create multiple divs, each with a unique mousedown callback function. However, I want each callback function to behave differently based on the specific div that is clicked. Below is the code I have been using to create the divs and set the ...

Experience the seamless transition of new CSS animations

I designed a basic HTML game where a moving box disappears when clicked on. However, the animation that follows does not originate from the click location but rather from the original position. I believe the remove @keyframes at 0% should be based on the ...

"Every time the $_POST array is accessed, it consistently contains 48 to

In my PHP file, I am querying a database to retrieve a list of items and then generating an HTML table to display those items. Each table cell contains input elements within a form <form> <table> ... <td> & ...

Expand the <canvas> element to completely fill the flex item without any scrollbars

I am currently utilizing Bootstrap 5 and experimenting with setting up a nested flex layout that occupies the entire window. One of the flex items should be filled by a "stretchy" canvas element, ensuring there are no scrollbars present. However, when I a ...

Utilizing Bootstrap for creating responsive CSS regulations

Is there a way for specific parts of my website to automatically resize on a mobile device without having to manually input responsive CSS rules based on page width? Can Bootstrap be used to trigger these changes instead? For instance, I noticed that Boot ...

The scroll bar disappears behind the div

Hello, I am looking to create an HTML layout similar to the one shown below: +----------------------+-----+ | upSide | | |----------------------| | | |right| | |side | | ...

Change the opacity of a DIV or any other element when hovering over it

I have successfully applied opacity: 1; to a paragraph when hovering over itself. However, I want the opacity to also change when hovering over the header above it. Here is my CSS code: .testH { font-family: impact; text-align: center; font-s ...

What is the best way to implement a background image using Tailwind in Next.js?

I am facing an issue with displaying a background image in my project. The image is stored in the public folder and named bg.png. In the index.js file located in the pages folder, I have attempted to set this image as a background but it seems to not be ...

Placing a text box above a perfectly centered container

Attempting to create an informative text box and feeling like the solution should be straightforward, but perhaps missing something crucial. After a few attempts and consulting with the powerful GPT, seeking advice here. The current appearance is as follo ...

Trouble displaying AngularJS $scope.data in the HTML code

I'm experiencing an issue where the data received from a POST request is being logged in the console, but is not displaying on the HTML page. Despite having a controller set up, the {{user}} variable is not appearing on the HTML page. While I can se ...

Is there a way for me to position my menu on the right side of my website?

I am currently working on a gallery website and facing an issue with the menu placement. I want to position the menu items on the right side of the images, but they keep appearing at the bottom instead. Despite adjusting the width in classes like galleryme ...

Error message: The function curl_init() is not defined and cannot be called in the specified file path on line number 102

In the process of creating a fresh project focused on Event Management, I am in need of setting up OTP verification for mobile numbers of users registering for the event. I have been utilizing the textlocal API to send out the OTPs, however, encountered ...

Creating an HTML form that submits data to a PHP script, which then saves the

Looking for some assistance with a PHP issue I am having. I know my way around PHP, but I wouldn't say I'm an expert. Here's the problem: I have created an HTML form (form.html) and now I want the output from formular.php to be saved as a u ...

Number entered isn't visible in Bootstrap modal window

Can anyone help me troubleshoot why the value "APno" is not appearing next to "Appointment Number" in a Bootstrap modal despite the modal showing up? This is my code: Form <form method="POST> Appointment Number:<br> <input type="n ...

Ways to expand the border horizontally using CSS animation from the middle

Currently, I am experimenting with CSS animation and I have a query regarding creating a vertical line that automatically grows in length when the page is loaded. I am interested in making the vertical line expand from the center in both upward and downwar ...

Having trouble loading image on web application

Currently, I am facing an issue while attempting to add a background image to an element within my Angular web application. Strangely enough, the relative path leading to the image seems to be causing my entire app to break. https://i.stack.imgur.com/b9qJ ...

Alert popup onclick feature is malfunctioning

SOLVED: I finally figured out the issue and it is now working perfectly. I had to manually switch to Chrome instead of using the Brackets live viewer. I want an alert box to pop up when the "Home" link is clicked on my website. I tried creating a separate ...

specified variables and functions within jquery

There is a jQuery file with all methods and properties defined at the top. I want to make changes in the file for study purposes. Can you tell me what this type of file is called? function ImageFlow () { /* Setting option defaults */ this.de ...

Positioning the dropdown under the search input in Ngbootstrap

Currently, I am referencing this specific documentation as I am interested in constructing a search bar similar to Gmail's layout. The search bar will consist of an input field along with a dropdown button that will display filter options. Regrettabl ...