The bottom section includes all the information

Hey there, I'm in the process of creating my personal website, but I'm having trouble with the footer covering two buttons. It's a strange issue that only seems to occur on my laptop; when I switch to my external monitor, the buttons are displayed properly. I attempted to add html{overflow-y: scroll;} to my CSS, but unfortunately, it didn't solve the problem :( Any assistance would be greatly appreciated! Thank you.

HTML:

@import url('https://fonts.googleapis.com/css?family=Roboto:700&display=swap');
* {
  padding: 0;
  margin: 0;
}

(-More CSS code goes here-)

<!doctype html>
<html lang="en">

(-More HTML code goes here-)

</html>

Answer №1

It seems like you have created a grid layout with three "rows": one for the "navbar," one for the "content," and one for the "footer," using the following CSS:

  display: grid;
  grid-template-rows: auto 1fr auto;

To indicate which row each section belongs to, you can wrap the containers for the rows in a wrapper .wrapper and specify the row number using grid-row: 2/2; for the content in row 2.

I have made some adjustments to your CSS, adding borders to visualize the layout. You may want to remove them later, but they help show the positioning in the flow. This is just a starting point, and you can build upon it further.

Below is the modified CSS code with the additional borders:

@import url('https://fonts.googleapis.com/css?family=Roboto:700&display=swap');
* {
  padding: 0;
  margin: 0;
}

body {
  background-color: ghostwhite;
  padding: 0;
  margin: 0;
  border: solid orange 3px;
}

.wrapper {
  display: grid;
  grid-template-rows: auto 1fr auto;
  border: lime 4px dashed;
}

/* Rest of the CSS properties with added borders */

<!doctype html>
<html lang="en ">

<head>
  <meta charset="utf-8">
  <title>Moritz </title>
  <link rel="stylesheet" href="style.css">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>

<body>
  <div class="wrapper">
    <nav class="navbar navbar-container">
      <img class="logo" src="logo.png">
      <ul class="menu-items">
        <li> <a class="active" href="#">Home</a></li>
        <li> <a href="#">About</a></li>
        <li> <a href="#">CV</a></li>
        <li> <a href="#">Favourites</a></li>
        <li> <a href="#">Contact</a></li>
      </ul>
    </nav>
    <div class="center content-container">
      <h1>Hi, I'm Moritz.</h1>
      <h2>I'm a student.</h2>
      <div class="buttons">
        <button>Explore more</button>
        <button class="btn">Contact me</button>
      </div>
    </div>
    <footer class="footer-container">
      <div class="footer-content">
        <h3>Moritz </h3>
        <p>Thank you for browsing. I hope to hear from you soon!</p>
        <ul class="socials">
          <li><a href="#"><i class="fa fa-twitter"></i></a></li>
          <li><a href="#"><i class="fa fa-linkedin-square"></i></a></li>
          <li><a href="#"><i class="fa fa-envelope"></i></a></li>
          <li><a href="#"><i class="fa fa-phone"></i></a></li>
        </ul>
      </div>
      <div class="footer-bottom">
        <p> Copyright &copy; 2021 Moritz </p>
      </div>
    </footer>
</body>

</html>

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

Making the browser refresh the CSS automatically once it has been modified

When updating a CSS file on the server, it's common for many client browsers to continue loading pages using the old cached CSS file for an extended period. After exploring various posts and piecing together different ideas, I have devised what appea ...

Efficiently transferring input to a Typescript file

Is there a better way to capture user input in Angular and pass it to TypeScript? <form > <input #input type="text" [(ngModel)]="inputColor" (input)="sendInput(input.value)" /> </form> The current method involves creating a ...

What is the correct way to prevent a UIWebView from crashing due to a nil value when loading an HTML file in Swift?

My goal is to load a simple all-text html file into a UIWebView using Swift. The test html file that I have created is as follows: <!DOCTYPE: html> <html> <body> test </body> It seems straightforward to me. I have placed the htm ...

Bootstrap implementation for personalized notifications

I am utilizing bootstrap notifications to display important messages to my users. Within my code, there is a DIV element named <div class="notifications bottom-right"></div> Theoretically, the library should be handling the JavaScript. I ha ...

browsing through elements in express-handlebars

this is the data structure I pass to my handlebars template module.exports = function(showHeader, userId){ // defining the model return { userId: userId, seminars: userSeminars; }; }; var userSeminars = [{ // sample data seminarId: 1, ...

Toggle the selection of a div by clicking a button in AngularJS with a toggle function

I have several div elements on a webpage. Each div contains a button! When the button is clicked for the first time: The border color of the div will change to blue (indicating the div is now selected). The "ok" button will be hidden (leaving only t ...

How to trigger a hover effect on a div and its child simultaneously using HTML and jQuery

Here's my concept: I want the text to be contained within div elements with an integrated image, rather than just having fading in and out pictures. Here's my attempt: #first{ position: absolute; } #second{ position: absolute; -we ...

When clicking on a different tab, the Bootstrap tab will shift to the left, outlining the new selection

While working with Bootstrap, I created a small footer with a tab. However, whenever I click on the second value, the entire div shifts to the left. How can I keep it in place? Below is my code along with two images depicting how the first tab aligns corr ...

What is the computed value of HTML and body?

Is there a specific reason why the body tag has a default margin while HTML does not? Could there be any practical explanation for this design choice? ...

What is the process for inserting an image into a table using el-table and el-table-column components in Vue.js while utilizing ui-elements?

I'm new to Vue.js and successfully built a basic table using the ui-element. The el-table element was utilized for constructing the table, with columns displayed using el-table-column and prop (see code below). Now, I want to incorporate images/avatar ...

Having trouble updating the icon on my website using FontAwsome

Just a heads up - I'm not familiar with HTML/CSS/JS. This template is pre-made, and I'm simply making some adjustments to it. Hello, I'm currently working on my portfolio website and I want to display my projects based on the programming la ...

Unsuccessful CORS on whateverorigin.org with YQL

Despite trying all three methods, I keep getting an error regarding cross domain access denied. Previously, I had successfully used YQL in different parts of my applications, but now it seems to have stopped working as well. JSFIDDLE <script> $(fun ...

Having trouble aligning material-ui GridList in the center

I am currently working with a GridList in order to display Cards. The styling for these components is set up as shown below: card.js const useStyles = makeStyles({ card: { maxWidth: 240, margin: 10 }, media: { heigh ...

Disabling the scaling feature in IE11's WebBrowser control: A step-by

After investing 48 hours into resolving this particular issue, I am reaching out to the knowledgeable StackoverFlowers community for assistance. My current project involves developing an application for large 27-inch multi-touch screens using C# 4.5. Withi ...

Having trouble with individuals gaining access to my gh-pages on Github

After creating a gh-pages repository on Github to showcase my portfolio, I encountered an issue where visitors were being prompted to log into Github in order to view the page. Gh-pages are intended to be public, so I am unsure why this is occurring. My ...

Database storing incorrect date values

After successfully displaying the current year and month in a textbox, an issue arises when submitting the data to the database. Instead of the expected value from the textbox, it defaults to 2014. What could be causing this discrepancy? function YearM ...

What could be causing my HTML element to vanish once the animation is complete?

I have successfully implemented an animation on 3 HTML elements for a landing page I am currently developing. The animations are working as intended, but I am facing an issue where the two lower elements (an h1 tag and a button) briefly appear on the page ...

Using the class for jQuery validation as opposed to the name attribute

I am looking to implement form validation using the jquery validate plugin, but I am facing an issue with using the 'name' attribute in the html since it is also used by the server application. Specifically, I want to restrict the number of check ...

Is there a way for me to determine if the HTML code is creating a new line?

Here is my code snippet: <div id="box"> <p> 123 </p> <p> abc </p> </div> <script> var html = document.getElementById("box").innerHTML; for (var i = 0, len = html.length; i & ...

Is it possible to adjust the size of a p5.js canvas within a bootstrap Div container?

I am attempting to incorporate a p5js canvas into a bootstrap grid structure. My goal is to have each div within the grid contain its own unique p5js canvas, which should adjust in size when the browser is resized. Below is my bootstrap grid setup, showca ...