- 0
Javascript Layout Issue
-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
Microsoft explains how to download and install the new "10 times faster" TypeScript
By hellowalkman,
- microsoft
- typescript
- (and 7 more)
- 0 replies
- 0 views
-
JavaScript devs beware: this very popular NPM package has been compromised by attackers
By David Uzondu,
- javascript
- axios
- (and 2 more)
- 0 replies
- 0 views
-
AI's impact on programming language popularity revealed
By zikalify,
- ieee
- programming languages
- (and 7 more)
- 3 replies
- 0 views
-
Over 300 npm packages compromised by self-replicating worm
By David Uzondu,
- javascript
- npm
- (and 3 more)
- 8 replies
- 0 views
-
Everyone seems powerless against Oracle's ownership of the JavaScript trademark 1 2
By Usama Jawad96,
- oracle
- javascript
- (and 5 more)
- 29 replies
- 0 views
-
Question
+Nik Louch Subscriber²
Hi
I'm building a layout, and ignoring all the stuff about sizing for mobile and so on - I want to achieve something fairly specific. When scrolling on large screens, the black "A title goes here" scrolls upwards until it sits under the menu and stops - that is working.
The sidebar similarly scrolls up until it sits under the menu and then stops. But the footer could impact it, so when the footer reaches the bottom of the sidebar, it "pushes" it up, so the sidebar scrolls with the page again.
This is all working just fine, but awkwardly on line 283, I am having to add a specific offset value. I know that if I change the height of any of the elements above the sidebar, the offset value needs to change. But I can't work out how to derive what it should be, so that any sizing of Hero image will work, for example.
Sorry for the messy code, I will be tidying that up once this works. Would anyone take a look? Also, yeah I'd never put all my CSS and JS in with my HTML normally, it's just for ease of postings sake.
Hope @mrbestersees this - he's usually great with these thing...
Thanks
Link to comment
https://www.neowin.net/forum/topic/1324594-javascript-layout-issue/Share on other sites
4 answers to this question
Recommended Posts