- 0
Javascript Layout Issue
-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
- 8 replies
- 2 views
-
Microsoft launches TypeScript 5.6 with a number of new improvements
By John Callaham,
- microsoft
- javascript
- (and 2 more)
- 1 reply
- 1 view
-
Free Download: Professional JavaScript for Web Developers eBook (worth $48)
By News Staff,
- ebook offer
- sponsored
- (and 2 more)
- 0 replies
- 1 view
-
Microsoft introduces TypeScript 5.5: Explore the latest features and enhancements
By zikalify,
- microsoft
- typescript
- (and 4 more)
- 0 replies
- 1 view
-
Free Offer: JavaScript Essentials for Dummies ($10 Value) eBook
By News Staff,
- ebook offer
- sponsored
- (and 2 more)
- 0 replies
- 1 view
-
Question
+Dick Montage 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