What are some ways to align text vertically in the footer section?

I have a footer section with four icons positioned in the center of the far right, followed by a text "Made by [NAME] in 2022, GitHub" which I'm having trouble aligning properly.

Below is the HTML code snippet:

HTML

<div class='footer'>
        <div class='icons'>
            <a href='https://github.com/'><img src='images/github.png' style="width:30px; 
                height: 30px;" class='github'></a>
            <a href='https://www.linkedin.com/in/'><img src='images/linkedin.png' 
                style="width: 30px; height: 29px;" class='linkedin'></a>
            <a href='https://www.instagram.com/'><img src='images/instagram.jpeg' 
                style="width:30px; height: 30px;" class='instagram'></a>
            <a href='https://www.facebook.com/'><img src='images/facebook.png' 
                style="width:30px; height: 30px;" class='facebook'></a>
            <p><em>Made by NAME in 2022, GitHub</em></p>
        </div>
    </div>

I am struggling with positioning the text under the 'icons' class and have individually styled each icon to try and achieve this alignment.

CSS

.footer{
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 80px;
        background: white;
    }

    .icons:link {
        padding-top: 1.7rem;
        display: flex;
        justify-content: flex-start;
    }

    .github {
        margin-right: 15px;
        margin-left: 15px;
        margin-top: 30px;
    }

    .linkedin {
        margin-right: 15px;
        margin-top: 30px;
    }

    .instagram {
        margin-right: 15px;
        margin-top: 30px;
    }

    .facebook {
        margin-top: 30px;
    }

    p {
        font-size: 1rem;
        margin-right: 20px;
        text-align: end;
    }

Answer №1

To achieve the desired effect, consider incorporating the code snippet below into your footer selector.

footer{
      background: white;
      display: flex;
      flex-direction: column;
      justify-content: center;
  } 

Does this align with what you had in mind?

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

How can I trigger the opening of an iframe without relying on jQuery when the user clicks on it?

I'm looking to create a UI where the user can click on an image and have an iframe appear on top of the image. Instead of using JQuery, I want to stick with pure JavaScript for this functionality. ...

The margin-top and margin-bottom properties are not functioning as expected

Check out this source: <div style="border:1px solid red; margin-bottom:10px">test blockA,</div>; <div style="border:1px solid red; margin-top:10px">test blockB</div>; There is consistently a spacing of 10px between blockA and ...

Retrieving the CSS property value from a website with Selenium

Hello there! For the purpose of verifying the font size of a CSS element on getbootstrap.com using Selenium in the Firefox browser, I rely on this particular script: #!/usr/bin/env perl use strict; use warnings; use Test::More; use Selenium::Firefox; my ...

Expandable rows within an Angular Material table (mat-table) feature a distinct gap, even when rows are collapsed

I recently integrated an Angular Material table into my website, following the examples provided on the official Angular page (link to the examples). I wanted the table rows to be expandable similar to the "Table with expandable rows" example on the Angula ...

AngularJS: How to automatically scroll to the bottom of a div

I cannot seem to scroll to the last message in my chat window. var app=angular.module('myApp', ['ngMaterial'] ); app.controller('ChatCtrl', function($window, $anchorScroll){ var self = this; self.messageWindowHeight = p ...

Regular expressions can be used to identify words within a block of text while ignoring any embedded HTML tags

As I explore the depths of regex, I stumbled upon a fascinating concept on stackoverflow. It involves enclosing specific words within a paragraph in span tags to enable users to click on them for further information. The implementation is flawless; however ...

Switch up div content - advertisements at the top or bottom

An issue has arisen where the ads on a website are currently being displayed at the bottom of the source code, but they should actually be visible at the top. Here is the ad placeholder code: <div id="300_250_placeholder"></div> And here is ...

The inspection of Microsoft VS Code and Angular 2 tags within an HTML code validator

Recently, I began delving into Angular 2 within VSCode. However, I encountered an issue with the built-in HTML linter not recognizing Angular 2 directives like *ng-if or (click) when working on the "Tour of Heroes" project from Angular.io. Here is a glimps ...

Creating a custom internal link with parameters using Twig

I am trying to create a link using this code: {{ path('article_show', { 'slug': article.slug }) }} but for an internal link format, such as: <a href="#ID_name">...</a> within an HTML context, while also passing one or mo ...

Problem with animated scrolling in Jquery

Currently, I am working on a function that aims to smoothly scroll the web to a specific div each time a user scrolls "into" a container div. You can get a better idea of what I mean by looking at my JSFiddle. Everything works perfectly when the user scro ...

Can you include an optional selector in SASS?

Here is an interesting concept: adding a CSS-selector optionally to the existing selector stack within a mixin. This is what I envision: @mixin myMixin(mobileSelector:true) { @if(mobileSelector) { .foo .mobile:before, } .classXY .subclass:before ...

Issue with locating JavaScript controller in Angular HTML file [Node.js/Angular]

Here are all the files and folders in my project located within the same directory. If you want to check out the project on Github, you can find it here: https://github.com/JohnsCurry/learnAngular. Just to confirm, they are all in the same folder. Unfortu ...

To see website changes, refreshing with Ctrl + F5 is necessary in the browser

I have a simple website that uses only HTML and CSS. Whenever I upload new files to the site, they do not appear in the browser until I perform a hard refresh by pressing CTRL + F5. Does anyone have any suggestions on how to fix this issue? ...

Effortless side-to-side and up-and-down scrolling

I recently launched a new website and I am looking to implement smooth horizontal and vertical scrolling. I want to have a menu on the right side that allows users to easily navigate to different sections. While I have found helpful codes and guides for ...

Is there a way to eliminate these HTML tags from my React application?

<figure class="image"><img scr="https://res.cloudinary.com/dfyhqttyxe/image/upload/v163126647133/zenith/uozgem6icqsrt3bitab6.jpg"></figure><p>The body</p> Within my ReactJS project, I am utilizing an edito ...

a shadowy see-through veil for division

I'm currently working on adding a dark transparent overlay to the product div whenever someone hovers over the product image. I've successfully created overlays for the entire screen in the past using similar logic, but this time it's behavi ...

Struggling to align block elements correctly after changing them to inline

I've been trying to align this paragraph while keeping the navigation menu and logo in their correct positions. I attempted to make everything inline, but that didn't work. Then I experimented with the float property, which only made things worse ...

Customizing Bootstrap styles with a custom CSS file

Currently, in my Django project, I am attempting to customize the base.html file which is utilizing the default bootstrap.min.css by replacing it with a custom.css file like so: base.html: <body id="bootstrap-overrides"> custom.css: #bootstrap-ov ...

Infuse Angular reusable components with vibrant colors, unique styles, and captivating design elements

Within my Angular application, I have a reusable button component in the login.component.html and login.component.ts files. This button is linked to a function called myFunction, with the button's name being passed as a label: <app-my-btn (onClick) ...

Creating a Functional Dropdown Menu with CSS and HTML

I recently created a test site without a drop-down menu, and here is how it looks: Check out my site here: Now, I want to add a simple drop-down menu for "serwery". Can anyone help me figure out what's wrong with my code? Here's the HTML: < ...