Getting problem with width when i add Component In react

Viewed 20

I Iam created WebPage in react with width 100% and when i add more component t to the web page te width of the horizontal Line screen is increased.. Need Solution

problem Image

For Example Code:-

    <div className="w-100">
 <COmponent1 />
<COmponent2 />
</div>
1 Answers

This is more related to CSS instead of ReactJS, try to give some styles to all the blocks on the page, like

* {
    box-sizing: border-box;
}

you can read more about box-sizing here

Related