I am having trouble getting my footer to align properly in a vertical position

My goal is to have my li elements remain on the same line, but unfortunately, they are not cooperating (they are aligning horizontally, but that's all).

Here is the code snippet:

<footer>
    <div class="container">
      <div id="coisas"
      class="col-6">
        <div class="row">
          <ul class="col-6">
            <li class="col-1"><img src="icon-behance.png"></li>
            <li class="col-1"><img src="icon-behance.png"></li>
            <li class="col-1"><img src="icon-behance.png"></li>
          </ul>
        </div>
      <div id="nothing"
      class="col-6">
      </div>
    </div>
  </footer>

Here is the CSS that accompanies this code:

#coisas {
  float: right;
  bottom: 0;
  position: absolute;
  size: 50%;
  left: 0;
  padding-left: 5%;
  padding-right: 5%;
}
#nothing {
  size: 50%;
  right: 0;
}

Answer №1

In order to obtain the desired outcome, consider implementing the following solution:

#things ul li{
  display:inline;
}

Check out the Codepen example- https://codepen.io/nagasai/pen/xyzABC

Answer №2

I'm a bit unsure about your intentions, but it's important to remember that Bootstrap col elements should always be nested within a row element.

<footer>
    <div class="container">
        <div class="row">
            <div id="items" class="col-6">
                <ul class="row list-unstyled">
                    <li class="col-1"><img src="//placehold.it/40"></li>
                    <li class="col-1"><img src="//placehold.it/40"></li>
                    <li class="col-1"><img src="//placehold.it/40"></li>
                </ul>
                <div id="empty" class="col-6">
                </div>
            </div>
        </div>
    </div>
</footer>

Answer №3

Just tackled the issue you were facing and got it sorted out. Feel free to take a look at the solution below!

#items ul li{
  float:left;
}

Live Example

Answer №4

When using the float property, you are indicating whether or not a box (an element) should float on the page. By floating the li elements to the left, they will align in the same line. To achieve this, you can use the following CSS:

#coisas ul li{
list-style-type:none;
float:left;
}

The list-style-type:none; property specifically removes the bullet points from list items.

To further understand the float property in CSS, you can visit the following link: https://www.w3schools.com/cssref/pr_class_float.asp

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 to automatically select a file and upload it to a specific server? If so, how can this

Hey there! I'm looking for a code snippet that allows me to automatically select a file and upload it to a specific link. Any ideas on how to accomplish this task? Here is the HTML code: <html> <head><title>Uploading</title>& ...

Adding an image within the body of text in a Django model, where both the text and image coexist

I am currently seeking a method to seamlessly insert an image within the text of my Django-powered blog. My goal is to achieve a layout similar to the one showcased in this example: https://i.stack.imgur.com/cFKgG.png The desired layout consists of two c ...

Changes influencing independent div elements

My goal is to design a front-end screen with images labeled steps 1-4 lined up next to each other. The concept is that when the user hovers over one of these steps, the corresponding image should fade in below them in a separate div. Upon removing the curs ...

Guide on customizing webpack to incorporate SCSS in a React application

After creating my React app using create-react-app (with React ver. 16.6.3), I decided to incorporate SCSS into my components. To begin, I ran the eject script and made necessary adjustments in webpack.config.dev.js: { test: cssRegex, exclude: cssMo ...

What is the updated technique for creating a full-width HTML section in 2023?

In most web designs, the content is typically "contained" to be centered and limited by a maximum width: <!DOCTYPE html> <html> <body> <div id="container" style="width: 1000px; margin: 0 auto;"> ...

Tips for directing attention to a specific row with an input field in JavaScript

I duplicated a table and added an input field for users to search or focus on a specific row. However, there are two issues: When a user enters a row number, the table displays the wrong row - for example, if the user enters 15, the table shows row number ...

Divs are not being organized into rows correctly due to issues with Bootstrap styling

I have implemented Bootstrap in my Angular application. The stylesheet link is included in my Index.html file as follows: <link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.css"> In addition to that, I have listed Bootstrap a ...

Issue with Angular FormControl Pattern Validator failing to validate against regex pattern

My goal is to restrict a text input field to specific characters only. I am looking to allow: alphanumeric characters (a-z A-Z 0-9) 3 special characters (comma, dash, single quotation mark) : , - ' A few accented characters: à â ç è é ê î ô ...

Editing the content of a div in real-time by dynamically updating the innerHTML

Looking for a way to dynamically change the innerHTML of a contentEditable div using pure JavaScript, without relying on the Rangy library. I want the change to occur on keyup without losing cursor position or focus. Here is an example setup: <div id=" ...

Can we incorporate modulo into the loop?

I have a JavaScript function with HTML code inside. I need the ".one-card" div to repeat four times within each ".row" div. The ".row" div is being repeated in a foreach loop. I want to check if the result of modulo (4) is not equal to zero, then display t ...

Steps to avoid HTML encoding the ' character in Next.js _document.js file

Currently, I am working on integrating VWO into my website by following the steps mentioned here. I have included the VWO script tag within a NextJs Head tag as shown below: <Head> <script type='text/javascript' id='vwoC ...

undefined reference to $

I'm currently working on a JavaScript project that involves using key events to display alphabets on the screen. However, I've encountered an error and need some assistance. <!DOCTYPE html> <html lang="en"> <head> <met ...

Different Types of Buttons in HTML

As someone who is new to the world of HTML coding and JavaScript, I have a question about button types. According to the W3Schools website, there are three types of buttons: <button type="button|submit|reset"> First question: Why do we need a for ...

Changing the href of an image when the slide changes: Tips and tricks

Currently, I am utilizing the slick slider slideshow and facing an issue with updating the href of a logo image as the slides progress. Despite trying out two different scripts, none of them have proven to be effective. <main class="Site-content"> & ...

Tips for spinning the background of a button without rotating the button itself

I'm encountering an issue while trying to rotate the background-image within my button. Instead of showing the specified background image, only the background color is visible. The photo includes a transparent section to achieve an arch-like appearanc ...

Toggle visibility of cards using bootstrap

I've been attempting to show and hide a selection of cards in bootstrap, but I'm having trouble figuring it out. All the cards share the class "card," and my goal is to hide them all when a specific button is clicked. Below is my current code: ...

The use of Angular's ngClass directive does not work within the link function

I have a straightforward directive that renders an element, and this is the template: <div class="nav-item"></div> The .nav-item class looks like this: .nav-item { height: 50; } Here's the directive in action: angular.module('m ...

The functionality of Vue is acting up with the HTML, unexpectedly refreshing when a button is clicked

I am currently experiencing an issue with my Vue application. When I click the button, it clears the input field (which it shouldn't) and doesn't perform any other actions. The variables "codigo" and "payload" do not display anything on the scree ...

personalized styles based on user preferences

My website features a gaming section where users can view quick status updates of their stats using colors like blue, red, and green. I am looking to generate something similar for each user. Here is what I have so far: <style> .box2 { height: ...

HTML string decoded incorrectly in CodeIgniter due to encoding error

When I send data that includes an HTML string along with other information from JavaScript to the PHP (Codeigniter) server using AJAX and JSON, I notice that the style information within the HTML string is missing once it reaches the server. Everything els ...