Ryan Abi-Sleiman
Ryan Abi-Sleiman

Reputation: 3

On ReactJS, my 'root' div doesn't span all the way up. How can I expand it?

I know it is a subject that has been brought many times. However, all the solutions I've tried didn't work and I'm coming here as last resort.

Where my root div stops:

where my root div stops

I have set the html and body CSS style to be:

html, body { height: 100%;   width: 100%; }

in my index.css. It still does not go all the way up.

Do you have any idea how to fix this?

Upvotes: 0

Views: 1608

Answers (1)

Maddie
Maddie

Reputation: 414

Try this:

html, body { height: 100%;   width: 100%; margin: 0; padding: 0; }

Update:

I checked your page and found the problem. When the inner elements have margin, the outer element gets affected too. Remove the margin-top of the navigation bar.

enter image description here

Upvotes: 1

Related Questions