The footer is being covered by the section, despite my attempts to address the issue with

I have noticed a section overlapping issue and I am struggling to figure out the cause. I have attempted using margins and padding to adjust the footer with my .div-wrap, but so far it has not been effective. After searching around, I am still uncertain about what might be causing this problem. Any insights or input would be greatly appreciated. I believe it may be a simple fix that I am currently overlooking. Thank you for your assistance.

    <style>
    @import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap');
    </style>
    
    <section class="servies">
        <div class=" services-container">
        <h4 class=" services">
         The era of mass marketing is long gone, and today brands must focus on authenticity and reaching their audiences in a non-advertorial manner. I am committed to helping you define your message and share it through various means, including identity and logo design, user experience and interface design, web development, social media marketing, campaign advertising, and e-commerce solutions. Whatever your creative requirements may be, feel free to reach out to schedule an appointment.
        </h4>
      </div>
    </section>
    
    
    <header>
          <h1>
            <a href="index.html"><img src="my-logo-01.svg" class="menu"></a>
          </h1>
        <nav>
          <a href="about.html" class="underline menu highlight">About</a>
          <a href="services.html" class="underline menu highlight">Services</a> 
          <a href="contact.html" class="underline menu highlight">Contact</a>
          <a href="blog.html" class="underline menu highlight">Blog</a>    
        </nav>  
    </header>
    
    <footer>
      <div class="footer-container">
        <div class="grid-container">
        <div class="based"> 
            <h3>
              BASED IN <br>
              CREAM CITY<br>
              <span class="highlight ">MILWAUKEE</span>
              <span class="highlight ">WISCONSIN</span>
            </h3>
          </div>
        <div class="follow-me">
          <h3>
            FOLLOW ME ON<br>
            <span class="highlight">INSTAGRAM</span>
            <span class="highlight">TWITTER</span>
            <span class="highlight">DRIBBLE</span>
            <span class="highlight">MEDIUM</span>
          </h3>
        </div>
        <div class="inq">
          <h3>
            FOR INQUIRIES<br>
            <span class="highlight">HI@WORKBY</span><br><span class="highlight">CHRIS.ME</span>
          </h3>
        </div>
        <div class="signup">
          <h3>
            SIGN UP FOR MY<br> NEWS LETTER
                      <form action="https://superhi1.createsend.com/t/j/s/vtikrl/" method="post"                            id="subForm" class="sign-up">
                <input placeholder="Email" id="fieldEmail" name="cm-vtikrl-vtikrl"                          type="email" required class="email-input">
                <input type="submit" value="Submit" class="submit">
              </form>
          </h3>
        </div>
      </div>
    </div>
    </footer>
    `
    
        h4 {
      font-size: 48px;
      line-height: 1.2;
    }
    
    section .services {
      height: 100vh;
      margin: auto;
    }
    
     .services-container {
      padding-bottom: 112px;
         min-height: 100%;
      height: auto;
      /* Negative indent footer by its height */
      margin: 0 auto -60px;
      /* Pad bottom by footer height */
      padding: 0 0 60px;
    }
    
    footer {
      height: 100vh;
      margin-top: 112px;
      padding: 64px;
    }
    
    .footer-container {
      margin: auto;
       max-width: 900px;
    }
    
    h3 {
      font-size: 56px;
      line-height: 1.2;
       font-weight: 800;
    }
    
    .grid-container {
      display: grid;
      grid-template-columns: 1fr 1fr;
      grid-template-rows: 1fr 1fr;
      gap: 80px 80px;
      grid-template-areas: "based follow-me" "inq signup";
     
    }
    
    .signup h3 {
      font-size: 48px;
     
    }
    
    
    
    form, .signup {
      font-size: 35px;
    }
    
    input[type=button], input[type=submit], input[type=reset] {
      background-color: #000000;
      border: none;
      color: white;
      padding: 16px 32px;
      text-decoration: none;
      margin: 4px 2px;
      cursor: pointer;
      width: 100%;
    }

Answer №1

Utilizing height: 100vh allows your content to occupy 100% of the browser's viewport, providing a relative rather than absolute height. This means that if the text within the element exceeds the viewport size, it may overlap with surrounding elements.

To address this issue, you have two solutions:

Solution #1

section .services {
    min-height: 100vh;
    margin: auto;
}

Solution #2

section .services {
    height: 100vh;
    margin: auto;
    overflow: hidden;
}

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

The HTML form submission button fails to submit the form and instead just refreshes the page

I'm struggling to get the save button working on my Chrome Extension settings page. The .click() event doesn't seem to be activating at all. I've included my code below. Should I use the commented out button instead (see below)? HTML <! ...

How can one retrieve the ID value within a function using jQuery?

I am trying to implement an upload picture function along with cropper js function. However, I am facing an issue with displaying the file name even though I have declared the variable and set the input value. But when I attempt to pass and display the nam ...

Locate grandchildren elements using getElementById

My task is to modify the content and attributes of the table. The DOM structure is generated by a third-party tool, and I am using JavaScript to make changes in various sections. <div id="myId"> <div> <div> <table&g ...

Can you use "or" or "not" syntax with CSS input type selectors?

In the world of programming, if they actually exist, Suppose I have created an HTML form with the following input fields: <input type="text" /> <input type="password" /> <input type="checkbox" /> I wish to style all input fields that a ...

Tips for maintaining the aspect ratio of an image while ensuring it always occupies 100% width and automatically adjusts its height

I've searched everywhere but can't seem to find the right CSS solution for my problem. How can I ensure that an image always fills 100% of the height and width of the screen while maintaining its aspect ratio? .myimage { object-fit: cover; widt ...

In my Flask Bootstrap website, the navigation bar remains unchanged by the presence of Javascript

I am currently in the process of creating a navigation bar for my Flask website using Bootstrap. However, when I implemented it into my HTML code, it is not displaying correctly which leads me to believe that the JavaScript may not be functioning properly. ...

CSS positioning problems thoroughly elucidated

I'm facing two issues that I can't seem to resolve. My goal is to recreate a design similar to the one found at https://i.sstatic.net/XfPqm.jpg. My first issue is with adjusting the box in the header to stay aligned next to my headline tags. The ...

How can one execute a function within an HTML attribute value using Angular?

I am currently attempting to use the weatherToFontAwesomeIcon(weatherDescription: string) function directly within the HTML file for this component. My goal is to showcase a specific FontAwesome icon based on the weather response from the API. import { Cur ...

Using jQuery to Validate Input Text Control Depending on Radio Selection

How can I ensure that the input text linked to the selected radio option is filled in? For instance, in the example above: If Contact 1's Email radio option is chosen, the Email text field for Contact 1 must not be empty, while the Phone and US Mai ...

Dynamic manipulation of classes based on user attributes

One thing I've noticed is that certain WordPress themes, like 'Thematic', include user-specific classes in the body element to avoid using CSS browser hacks. For example: wordpress y2010 m02 d26 h05 home singular slug-home page pageid-94 pa ...

Can you conceal the label while also displaying the placeholder?

Within my form, I am using the following code: <div id="zipcode-label" class="f-label"><label for="zipcode" class="required">Zip code</label></div> <div id="first-element" class="f-element"><input type="tel" class='ro ...

When I attempt to incorporate multiple sliders on a single page, I encounter difficulties in determining the accurate stopping position if the number of slides varies

I am having trouble setting the correct stop position for sliders with different numbers of slides on a page. When I have the same number of slides in each slider, everything works fine. However, I need to have a different number of slides in each slider ...

Protecting client-side game logic operations with web application security

I've been developing a web-based game that utilizes the Canvas feature of HTML5. However, I've come to realize that there is a significant vulnerability in my system. The scoring and gameplay statistics are currently being calculated on the clien ...

Adjust the text color based on the background image or color

Here on this site, I have designed the first div to display a dark image, while the second one shows a light background. I am aiming to adjust the sidebar text color based on whether it is displayed against the dark or light background. How can I achieve ...

The design of the website is all over the place

I am encountering challenges in creating distinct containers for the header, body, and other sections of my website. The layout is not turning out as planned, and I can't pinpoint where my code is going wrong. Any advice or suggestions on how to resol ...

Having issues with ToggleClass and RemoveClass functionalities not functioning properly

As a novice in Jquery and CSS/scss, I've managed to create dynamic bootstrap cards for recording players. Each card consists of a music-container with control-play and vinyl elements. I aim to have multiple bootstrap cards generated based on the data ...

"Encountered an Ajax Error while appending request parameters to the same link during a

I can't figure out why my ajax request is sending to the same link instead of the specified url. It's only this ajax request on the entire page that is behaving strangely. Can anyone shed some light on this issue? $(document).ready(function(){ ...

Reordering Bootstrap 4.1 columns for improved visibility on smaller screens

I'm having trouble adjusting the column order for small screen resolutions in Bootstrap 4.1. I've added the order prefix but nothing seems to be changing. Here is a snippet of my HTML code. Can anyone offer assistance? <div class="container-f ...

Steps to apply styles to an iframe element directly from its inner HTML code

Looking for help with this line of code: <iframe src="http://www.google.com" name="google" style="Z-INDEX: 0; MARGIN-TOP: -1px; WIDTH: 100%; HEIGHT: 1070px"> <html> <head></head> <body> < ...

What is the main purpose of using the CSS transform:translate() property?

When CSS3 introduced animations with transition properties, it gave developers two main ways to change the position of an element. The first method involves setting the element's position as absolute and adjusting the left, right, top, and bottom prop ...