[beta] .challenges-instructions-panel div has static height
See original GitHub issueChallenge Name
Beta challenges
Issue Description
The div .challenges-instructions-panel height is only changed when first loaded.
This leads to two problems:
- Resizing the browser screen up.
If the screen height increases, you get a scroll bar in the
.challenges-instructions-paneldiv, and its height remains the same. - Resizing the browser screen down.
If the screen height reduces, you get a scroll bar in the
body, and the.challenges-instructions-panelheight remains the same.
This behavior only happens with the BETA.
Browser Information
Tested on both Chrome and Firefox on Windows 10 Desktop.
Screenshot
-
Resizing it up

-
Resizing it down

Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:7 (4 by maintainers)
Top Results From Across the Web
How to make Bootstrap Panel body with fixed height
To restrict the height to a fixed value you can use something like this. <div class="panel panel-primary"> <div ...
Read more >Viewing online file analysis results for 'yahoo.php'
This report is generated from a file or URL submitted to this webservice on ... This report has 7 indicators that were mapped...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

There are a couple of nested reasons for this.
The first layer: We determine the height of the challenge div at startup and disable auto updates because it is quite expensive to listen to scroll events.
The next layer down: We have to set a static height here because we want the challenge div to be no larger then the users window minus the height of the nav bar, which is a sticky nav bar.
This is largely a css issue that we throw some javascript on top of to patch up.
@QuincyLarson and I have discussed once or twice removing the sticky-ness of the navbar and making it scroll away with the rest of the page. This should solve this issue as we would no longer need to set a static height of the challenge window, we could give it
height: 100%.@leonfeng For one column this problem behaves differently from the cases I showed before, however if you open the windows like this:
Then, you resize its height up, the screen will behave like this:
While if you refresh the page with same height, it will behave like this:
So it is basically because the height of the div is calculated on load, setting the inline style for height. In addition to that, the div
.challenges-editorbehaves in the same way, with an inline style setting a static height. You just need to play around, refreshing, resizing the screen and you will notice this behavior. While if you do this in the current FCC, it does not happen, the size changes on resize.