sian
sian

Reputation: 1

How to stop a certain part of html page from scrolling?

I'm trying to copy the twitter websites homepage but I have a problem with the side section scrolling.

This is the right side section I created/copied from twitter homepage right side section

and it won't stop scrolling until it reaches the max height of the page, I also tried setting the height/max-height to it's only true height (1308px) and it doesn't work.

I only use HTML and CSS by the way and does not want to put JS. Is there a solution using only HTML and CSS?

Upvotes: 0

Views: 382

Answers (1)

Ehsan
Ehsan

Reputation: 2285

in your html:

<div id="footer">some elements here</div>

and in your css:

#footer {
  position: fixed;
  width: 100%;
  bottom: 0;
}

Upvotes: 1

Related Questions