skip to Main Content

I’m sort of new around here, definite newby with HTML/CSS, I don’t know if I should post the entire content of my website code, probably not, if I share the site you can open the code with developer tools online right?

My website is cme.horse

The problem is in the Home page (main/index page), it scrolls past the footer, but all the other pages are working well. I’ve copied and pasted entire sections over and over to make sure there’s no typo. And have spent hours looking for the error.

If you could help me, much appreciated!

I’ve copied and pasted entire portions of the CSS code, and spent literally hours and hours looking for the error, I don’t give up easily, but this one has me in the brink of a nervous breakdown!

2

Answers


  1. Combination of these two lines is causing this effect:

    html, body {
      height: 100%;
      overflow-x: hidden;
      ...
    }
    

    The overflow-x might be an easier removal, however it depends on what you’re trying to achieve. Height 100% set a box the height of the window, instead of a full document height, as you’d typically see it on websites. So the internal part has to scroll within that box.

    I am not sure why other pages don’t have the same effect, but I noticed that your script index.js is connected on home page and not others.

    Login or Signup to reply.
  2. I found solution to your problem.

    Error is in 6th line of your CSS file. You applied your css properties to both your html , body tags.

    Corrected code :

    body {
        font-family: 'Merriweather', serif;
        font-family: 'Playfair Display', serif;
        font-family: 'Sacramento', serif;
        font-size: 100%;
        height: 100%;
        scroll-behavior: smooth;
        margin: 0;
        padding: 0;
        background-color: rgb(243, 224, 199, 1);
        overflow-x: hidden;
    }
    

    enter image description here

    Instead of this apply this changes in your file and it will be all perfect.

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search