The header division remains fixed at the top, while a vertical scrolling division below it contains a scrollbar that is only

Utilizing a bootstrap class, I have created a sticky top header.

header.js

<header className="header sticky-top">HEADER</header>

stylesheet

header {
  overflow: hidden;
  padding: 20px 10px;
  display: inline-flex;
  width: 100%;
  height: fit-content;
  background-color: blue;
}

body {
  margin: 0;
  height: 100vh;
  overflow:auto;
  scroll-behavior: smooth;
}

This is my desired layout:

______________________
|_______header_______|
|                  |*|
|   Container Div  |*|
|                  |*|
|                  |*|
|                  |*|
|                  |*|
|                  |*|
----------------------

* = scrollbar

Feel free to check out the example project on the following demo code sandbox

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Introducing a new VOIP functionality

My server is set up using nodeJS and express, and I am interested in incorporating a VOIP feature into it. Specifically, I have a twilio phone number and understand how to utilize webhooks for SMS messages or programmable voice responses. However, I am str ...

"Encountering a dark screen issue in React Native video playback following certain videos

Here is the list of dependencies in my package.json file: "dependencies": { "jetifier": "^2.0.0", "link": "^1.5.1", "link-preview-js": "^3.0.5", "moment": " ...

Changing the default date display in Vue.js

Is there a way to automatically set today's date as the default date on the datepicker? Here is the code snippet: <template lang="html"> <input type="date" v-model="date"> </template> <script lang="js"> export default { nam ...

CSS background image that will not be affected by padding-top

Is there a way to make a background image override the top padding on the first section of a website? I have set padding-top to separate the first title from the navbar, but now I want the background image to take precedence. Thank you! Using HTML: < ...

Encountering a CORS issue while using @react-google-maps/api

I encountered a CORS error while using the onClick function. The static markers are set up on page load and not added dynamically. They render correctly, but when I click on the markers, I receive a CORS error pointing to the setSelected line. Any ideas on ...

Developing a PHP and MySQL SQL script for a contact form

As a newcomer to HTML, PHP, and MySQL, I am working on an assignment project for my homework. This project involves extending a previous one that involved creating a contact form using HTML and PHP, then uploading it to the school's server. I will be ...

What is the best way to adjust the height and width of an mp4 video in Internet Explorer?

I came across a code snippet that looks like this video { object-fit:fill; } <!DOCTYPE html> <html> <body> <video width="800" height="240" controls> <source src="http://www.w3schools.com/tags/movie.mp4" type="video/mp4" ...

Do hooks get executed during every render phase?

Currently, I am utilizing the context API and hooks in my project. I have a total of 20 state variables, and every time one of them changes (resulting in setting states), the function is called again or re-renders. This has raised some concerns for me in t ...

Tips for creating a functional CSS zigzag border

I've been experimenting with creating a CSS zigzag vertical border and came across this Codepen for inspiration. However, my attempts only result in diamond shapes and I've been struggling to make it work. Here is the link to my Codepen. body ...

Tips on showcasing a JSON object containing two arrays in HTML using a pair of for loops

I am facing an issue with displaying data from two tables in my PHP script. The personal information is being displayed correctly, but the books related to each person are not showing up. I suspect that my approach might not be efficient enough for handlin ...

Determine the TR id when a button within a TD element is clicked using JavaScript/jQuery

Currently seeking a method to generate a unique identifier for use as a parameter in a JavaScript function. Specifically interested in extracting the id of the first td element if feasible. <tr id='it'><td id="#nameiron">Jason</td ...

What is preventing ng-bootstrap components from functioning as a web component?

My project example is based on the Basic Date Picker Example for Angular. When built as an Angular app, everything functions correctly. However, when attempting to create an Angular web component using this code, certain functionalities do not work as exp ...

AngularJS does not update values properly if there is a style applied to the parent container

I'm struggling to find the best approach to handle this situation. This is how my AngularJS code looks: <span class="something" ng-hide="onsomecondition"> {{value}} </span> .something{ text-align:left; padding:10px;} Issue: The value ...

Retrieving numerous data points from the user interface

I am in the process of designing a user interface that includes various fields such as text boxes, dates, etc. It is important for users to be able to add values to these fields multiple times as needed. For example, a user fills out all the information ...

Is it possible to change the value of a react-final-form Field component using the onSelect function?

I am currently working on a React application using TypeScript and incorporating the Google Places and Geocoder APIs through various React libraries such as "react-places-autocomplete": "^7.2.1" and "react-final-form": "^6.3.0". The issue I'm facing ...

What technique is used to fill these circular progress indicators?

I stumbled upon some circular progress bars and I'm a bit confused about how they are filled. Check out this codepen link: https://codepen.io/anon/pen/aeEEmx From what I understand, when using gradients with specified positions (degrees in this case) ...

Tips for developing a sophisticated HTML quiz

I have spent countless hours perfecting this quiz. I have successfully created a quiz that reveals solutions at the end, but I want to take it one step further. I envision the answers appearing after each incorrect response from the user, and no answer sho ...

transform an HTML webpage into a JSP file

After creating my interface with bootstrap, I've realized that I should have used JSP to connect it to my backend built with the Spring framework. Can anyone provide guidance on how to convert my HTML pages into JSP pages? ...

In Angular Mat Stepper, only allow navigation to active and completed steps

For a project, I created a sample using React.js and Material UI. Here is the link to the project: https://stackblitz.com/edit/dynamic-stepper-react-l2m3mi?file=DynamicStepper.js Now, I am attempting to recreate the same sample using Angular and Material, ...

The componentDidMount lifecycle method of a rendered component in a Route is not being triggered

IMPORTANT: SOLUTION PROVIDED BELOW, NO NEED TO READ THROUGH THE QUESTION I am utilizing the following Router with react-router 4 return ( <Router> <Page> <Route exact path="/" component={HomePage} /> <Route path="/c ...