Step-by-step guide on positioning mid and bottom text using Bootstrap grid system

After searching and trying various solutions, I am still unable to get the desired output. My goal is to use grids in Bootstrap to set the footer layout with the class "link-footer" positioned at the middle height of the div and the class "footer-copyright" at the bottom. Here is an example of what I am aiming for:

Below is the clean code:

<footer class="page-footer">
  <div class="container-fluid text-center">
    <div class="row">
      <div class="col-4 col-footer">
        <h1>aloha name</h1>
      </div>

      <div class="col-2 link-footer">
        <a href="#" class="text-uppercase">home</a>
      </div>
      <div class="col-2 link-footer">
        <a href="#" class="text-uppercase">about me</a>
      </div>
      <div class="col-2 link-footer">
        <a href="#" class="text-uppercase">projects</a>
      </div>
      <div class="col-2 link-footer">
        <a href="#" class="text-uppercase">contact</a>
      </div>

    </div>
  </div>

  <div class="footer-copyright text-center">© 2020 Copyright:
    <span>aloha</span>
  </div>
</footer>

The accompanying CSS is straightforward:

footer {
background-color: #545454;
height: 200px;
}

.col-footer h1 {
text-transform: uppercase;
font-family: 'Montserrat', sans-serif;
font-weight: 800;
font-size:2em;
color:white;
}

.link-footer a {
font-size:1em;
color:white;
font-weight: 600;
text-decoration: none;
}

.link-footer a:hover {
color:#4860FF;
}

.footer-copyright {
background-color: #3b3b3b;
color: #838383;

}

.footer-copyright span{
color: white;
}

I have tried using margins, padding, vertical-align properties, but nothing seems to achieve the desired outcome. Any suggestions? Thank you!

Answer №1

Unfortunately, the screenshot provided does not offer much assistance.

However, another option could be:

<footer class="page-footer">
    <div class="container-fluid text-center py-5" >
        <div class="row">
            <div class="col-4 col-footer">
                <h1>hello name</h1>
            </div>

            <div class="col-2 link-footer">
                <a href="#" class="text-uppercase">home</a>
            </div>
            <div class="col-2 link-footer">
                <a href="#" class="text-uppercase">about us</a>
            </div>
            <div class="col-2 link-footer">
                <a href="#" class="text-uppercase">our work</a>
            </div>
            <div class="col-2 link-footer">
                <a href="#" class="text-uppercase">get in touch</a>
            </div>

        </div>
    </div>

        <div class="footer-copyright text-center" style="margin-top: -15px; padding-bottom: 15px;">© 2021 All Rights Reserved:
            <span>hello</span>
        </div>
</footer>

Don't forget to include the inline CSS in your stylesheet.

Answer №2

footer {
background-color: #545454;
height: 200px;
}

.col-footer h1 {
text-transform: uppercase;
font-family: 'Montserrat', sans-serif;
font-weight: 800;
font-size:2em;
color:white;
}
.link-footer a {
font-size:1em;
color:white;
font-weight: 600;
text-decoration: none;
float:left;
}
.text-uppercase{
padding-right:2em;
}
.link-footer a:hover {
color:#4860FF;
}

.footer-copyright {
background-color: #3b3b3b;
color: #838383;
 position: fixed;
   left: 0;
   bottom: 0;
   width:100%;
   text-align: center;

}

.footer-copyright span{
color: white;
}
<footer class="page-footer">
  <div class="container-fluid text-center">
    <div class="row">
      <div class="col-4 col-footer">
        <h1>hello there</h1>
      </div>

      <div class="col-2 link-footer">
        <a href="#" class="text-uppercase">home</a>
      </div>
      <div class="col-2 link-footer">
        <a href="#" class="text-uppercase">about us</a>
      </div>
      <div class="col-2 link-footer">
        <a href="#" class="text-uppercase">our projects</a>
      </div>
      <div class="col-2 link-footer">
        <a href="#" class="text-uppercase">get in touch</a>
      </div>

    </div>
  </div>

  <div class="footer-copyright text-center">© 2021 All Rights Reserved:
    <span>hello there</span>
  </div>
</footer>

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

Using Javascript, you can create a function that can disable or enable a text link based on

Here is the code snippet showcasing CSS styles and HTML elements: CSS: .enableLink{ font-family:Verdana, Geneva, sans-serif; font-size:12px; color:#069; padding-right:20px; text-decoration:underline; cursor:pointer; } .disableLink{ display:none; fon ...

Alter appearance using various classes

I am seeking assistance in changing the font of text using classes. I have multiple texts with different classes and I want to be able to edit all the texts without adding another dropdown menu. I believe that the change needs to occur in a script. Pleas ...

Don't forget to keep track of when the user has closed

How can I ensure that the cache retains the user's action of closing the div? Currently, when I close the div and refresh the page, it reverts back to its original state. Is there a way to make this change persistent? Experience it live: Here is the ...

Tips for customizing the CSS file of a React component imported from a UI framework

As I embark on building a large application utilizing React, I find myself navigating the new territory of React philosophy coming from a background of Css+Js+jQuery methods. One key requirement for my project is a reliable UI framework that aligns with Go ...

Minimize the entire project by compressing the .css, .js, and .html files

After recently incorporating Grunt into my workflow, I was thrilled with how it streamlined the process of minifying/concatenating .css files and minifying/uglify/concatenating .js files. With Grunt watch and express, I was able to automate compiling and ...

two occurrences of the identical controller in AngularJS

Encountering a dilemma (admittedly, not the best approach). There is a single view featuring a split screen; an input field occupies the left side while its corresponding value appears on the right. Both sides are managed by the same controller, using the ...

Position the div in the center with overflow properties

After returning to web design as a hobby, I've encountered some difficulties. I'm currently trying to center a div that contains other centered divs. However, when resizing the page, I want to ensure that the divs remain centered and their overfl ...

Image displayed in tooltip when hovering over

I have been experimenting with displaying an image in a tooltip when hovering over it. I came across a fantastic solution that suits my needs: Codepen CSS: @import "compass"; * { box-sizing: border-box; } .tooltip { position: relative; border-bo ...

The directive for Content Security Policy in Django framework

I am having trouble importing font-awesome into my application. I've tried the following code: <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css"> However, this is causing an err ...

Failing to hide a div on hover: Hoverintent's shortcomings

When I hover over the div with the unique identifier id="navbar", it doesn't seem to trigger any actions. I have included the following script in my document head: <script type="text/javascript" src="https://ajax.googleapi ...

Creating semantic advertisement content using HTML5 tags

With the abundance of Semantic tags in html5 for sectioning content and their importance for Search Engines, I now have a need to incorporate advertisements into my articles. My query revolves around identifying a tag that can clearly indicate when child ...

Tips for making a fluid DIV expand to fit the entire width of the page

My layout features fixed-width sidebars on the left and right, with a fluid main content area that fills the space in between using float:left. Here's an example: #left-sidebar {width: 200px;} #right-sidebar {width: 300px;} #main-content {margin-left ...

Strange formatting in the internet explorer browser (IE)

I have encountered an issue with CSS animation elements on the home page. The animations appear correctly in Google Chrome, but there is a strange indentation problem when viewed in IE. I have tried several solutions without success. Although I am not a w ...

The header that sticks on scroll is annoyingly blocking the content

I managed to create a sticky on-scroll header/navigation bar successfully. Here is how it looks now However, I encountered an issue. When it reaches the top, it automatically 'covers' the top part of my content, which has text on it, and I don& ...

"Customizing the topbar of Twitter Bootstrap for right-to

Attempting to implement twitter bootstrap for a top navigation bar on my master page. http://jsfiddle.net/ZqCah/1/ Encountering some issues and seeking assistance: 1- Desiring to switch the direction of all content to right-to-left (rtl). This would me ...

Is it a good idea to relocate the pagination to the top of the DataGrid in MUI

Can someone suggest a solution for moving the default pagination of XGrid above the table? Or do I need to develop my own custom pagination instead of using the built-in feature with XGrid? ...

Retrieve a property from a designated element within the DOM

Is there a way to specifically extract the src attribute of the second image in an HTML file using PHP DOM parser? foreach($html->find('img[src]') as $element) $src = $element->getAttribute('src'); echo $src; I s ...

What are the steps for manually integrating Bootstrap into an Angular project?

I'm currently working on an Angular 5 project within a private domain where I am unable to utilize the npm-install command. As a result, I have manually added Bootstrap's CSS and JS files to my project. I am now unsure how to properly link these ...

Guide on extracting a JavaScript string from a URL using Django

How can I extract "things" from the JavaScript URL "/people/things/" without any unnecessary characters? I've attempted inefficient methods like iteration, but struggle with removing the undesired parts of the string, leading to slow performance. Th ...

Ensure the webpage is set to have a minimum width of 1024 pixels

Is it possible to make a webpage that utilizes bootstrap, Angular 2x, and Scss stop being responsive once the screen width reaches 1024px? I would like the layout to stay fixed at this size and enable horizontal scrolling for users who resize their browser ...