Minimize the gap between buttons and images

Is there a way to reduce the spacing between the "upload picture" button and the "images" square boxes? Take a look here

Currently, it looks like this:

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

I would like it to look like this:

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

.col1-layout .col-main {
    float: none;
    width: auto;
    padding: 0;
}

font-family: 'Roboto Condensed', sans-serif;
    color: #636363;
    font-size: 14px;
    line-height: 1.5;

Answer №1

There seems to be an unnecessary character in the HTML code -

https://i.sstatic.net/5rKnH.jpg

Please remove it and make adjustments to the margin as follows -

#formId {
  margin: 15px auto;
  width: 50%;
}

Answer №2

Implement Top & Bottom Padding in Pixels

#formId {
    padding: 10px;
    width: 50%;
}

Answer №3

Kindly make sure to update your CSS

#formId {
    margin: 3% auto 5%;
    width: 50%;
}

Change it to:

#formId {
    margin: 3% auto 0%;
    width: 50%;
}

Additionally, ensure to remove the extra '-' before ul.

Answer №4

If you no longer need this part of your code, feel free to remove it:

<div id="lblError" style="color:#ff0000;margin-top:10px;"></div>

Also, make sure to adjust your CSS from 3% to 0% like so:

#formId {
margin: 3% auto 0%;}

Hopefully, this advice will be beneficial for you. Thank you.

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

Is it possible for me to position an element beside the element before it?

Imagine a traditional layout consisting of paragraphs grouped with a sidebar. However, there are two issues with this setup: first, the browser displays the sidebar (typically used for navigation) before the main content, causing problems for screen reader ...

Adjust the size of the text and the textarea at the same time

I am trying to resize text simultaneously while resizing the textarea in my code. I am using jQuery for this functionality. However, I believe there is an issue with the click function being separated. Any advice on how to fix this would be greatly appreci ...

Express router is not functioning properly with the static CSS file

My current project involves using Express to create a login application, with EJS as the chosen template engine. The file structure of the application is as follows: package.json server.js routes index.js users.js views layouts.ejs login.ejs ...

Closing the space between vertical edges of table data cells

I'm currently in the process of translating my resume from MS Word to HTML and CSS for easier maintenance and sharing purposes. I really like the layout and style of my resume and want to maintain it. The design features a left column with bold titles ...

Find the total sum of various spans

As a beginner in programming, I am facing a challenge that I cannot seem to solve. How can I retrieve the values of multiple spans with the same class? This is how the HTML code looks: <ul> <li> <input type="checkbox" value="30 ...

Adjust the contents of a DIV depending on which Toggle button is selected

When a user clicks on either "Twin Bed" or "King Bed", the content inside the "demand-message" should change to either "high demand" or "Only ??? rooms left". The ID will remain the same for both buttons due to existing logic. However, the message display ...

Guide on attaching an event to every dynamically created element in JavaScript

I'm currently generating 'li' elements dynamically using a loop and running into issues when it comes to assigning events to each generated element. My goal is to assign an onclick event to every li element that is created. Check out the co ...

Utilizing a single video format for HTML5 video playback

Adobe's announcement to phase out Flash Player by the end of 2020 has raised concerns about the migration of Flash content to HTML5. While many agree that this transition is necessary, there are questions about how ready HTML5 is to replace Flash enti ...

VSCode displaying HTML errors within a .ts file

There is a strange issue with some of my .ts files showing errors that are typically found in HTML files. For example, I am seeing "Can't bind to 'ngClass' since it isn't a known property of 'div'" appearing over an import in ...

Ways to limit the extent of inline CSS styling?

I am working on a project where I need to apply unique CSS to each item in a list dynamically. Each item will have its own set of CSS rules specifically tailored to its elements. <div id="thing1" class="vegas"> <style> p { font-size: ...

The copyright (©) symbol is unresponsive to rotation

Why can't I rotate the © character? Am I missing something? .copy { font-size: 12px; font-family: Arial; writing-mode: vertical-rl; text-orientation: mixed; transform: rotate(180deg); } <span class="copy">&copy; This is not ...

In the event of a 404 error, simply direct the user to the pageNotFound before ultimately guiding them back

I'm developing a website with Node JS and I want to implement a feature where if the user attempts to navigate to a non-existent page, they are redirected to a "Page Not Found" message before being automatically taken back to the home page after a few ...

Tips for identifying different screen sizes, such as distinguishing between a spacious desktop monitor and a compact smartphone display, using CSS media queries

Imagine you have two screens: they have the same resolution they are oriented in the same way but they have different physical sizes For example: https://i.sstatic.net/OcMnt.png How can I style for different screen sizes using CSS media queries? For i ...

Instead of only one menu icon, now there are three menu icons displayed on the screen. (Additionally, two more divs containing

When visiting on a smartphone browser, you may notice that instead of one menu icon, three icons appear. Upon inspecting the elements, you will find that there are three div's that look like this: <div class="responsive-menu-icon">&l ...

Can one determine whether an SCSS element is devoid of content?

Can SCSS be used to determine if an element is empty? For instance, I'm interested in assigning a variable based on whether the class has content or not. <div class="defaultClass"> <!-- This div is empty --> </div> Is there a w ...

problem with arranging photos and captions

When viewing this page in a narrow browser window, an issue arises with how the photo captions are displayed at the bottom of the page. It's evident that the caption extends past the right edge of the photo. My preference would be for the photo and c ...

When using the 'rtl' direction in Dojo Text, all special characters are aligned to the right

I'm having an issue with keeping the text of a button centered followed by an icon. The code works fine until I add special characters in front of the button text. In that case, the special characters are placed after the text followed by the icon. I ...

What are the advantages of incorporating JSON for retrieving data from MySQL?

So I have developed a website that retrieves data from a MySQL database using PHP, and then transforms it into JSON format for use with JavaScript. This process can be broken down into 5 steps: Query -> PDO Statement -> PHP Array -> JSON Strin ...

Variation in pixel dimensions

What causes the difference between Chrome and screen capture? I am utilizing bootstrap. I desire to achieve true pixels of 50px. HTML <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-h ...

Problems Arising with Bootstrap Media Queries on Smaller Tablets in Landscape View

I am currently using Bootstrap's standard media queries for my project and they are working perfectly, except for small tablets in landscape mode. I have included an image to demonstrate this issue. The problem seems to arise from the custom CSS that ...