Welcome to Code Forum!

Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.

    GIF shows where to locate </> in the thread and or post editor toolbar.
    To learn more about how to use our BBCode feature, review our "How to post your code into threads" here.

    Thank you, Code Forum.

gap in code

Pavel

Well-Known Coder
Hi,

please see

Home on a desktop

notice below the footer there is a white gap

my codepen


no gap, and on my smart phone no gap

please help me out

provide the correct code to fully resolve my issue


and a freindly follow up

kindly address a previous post here


many thanks! 🙂
 
The white gap shows on your desktop because the height of the screen is more than the page height. On your phone, or on codepen, the window height is smaller than the page height, so there's no white space below the footer.

To fix this you'll have to add min-height: 100vh to the body. This will make sure the page height is never less than the window height.
 
Oh ok, I hadn't checked your code.

Making the body a flex element, and then adding margin-top: auto; to the footer should fix it.
CSS:
body {
  display: flex;
  flex-direction: column;
}

footer {
  margin-top: auto;
}

Note that the footer goes a bit below the screen. This is because the footer height is actually 64px and some of the children elements seem to be overflowing out of the footer, but the footer itself is actually at the bottom of the page.
 

Attachments

  • 1689180447523.png
    1689180447523.png
    29.4 KB · Views: 1
Oh ok, I hadn't checked your code.

Making the body a flex element, and then adding margin-top: auto; to the footer should fix it.
CSS:
body {
  display: flex;
  flex-direction: column;
}

footer {
  margin-top: auto;
}

Note that the footer goes a bit below the screen. This is because the footer height is actually 64px and some of the children elements seem to be overflowing out of the footer, but the footer itself is actually at the bottom of the page.
yes, the white space is no longer under the footer.... but now its ABOVE the footer 🙂

see
Code:
https://forallthetime.com/drop2/contact_1.html

and this

Code:
https://forallthetime.com/drop3/contact_1.html

please use a codepen if that helps 🙂

what i did there was found the exact color of the form and made the white space that color

is that ok? anything to worry about? it wont bite me in the butt some where down the line?

how can i move the contact form?

Code:
position: relative
?

what would that code look like?

MANY THANKS!
 

Latest posts

Buy us a coffee!

Buy me a coffee.
Back
Top Bottom