Try to use the bootstrap grid system see here , using it you do not have to worry about width nor height of the components you are using, not to mention that your site is responsive.
If you use the grid system, avoid breaking library logic, causing item size overflow by inserting the width or height selector.
If you do not know or want to use the grid system, I advise you to use the height and width selectors, always as a percentage.
Example: width:200%
I was recently learning to work with the bootstrap grid and maybe it's a good show here.
This code is in EcmaScript because it was being developed along with ReactJS, but ignore this detail so as not to complicate.
<header style={cssHeader}>
<Grid fluid={true} style={cssGrid}>
<Row style={cssRow}>
<Col lg={2} md={4} xs={12} style={cssCol}>
<h1 > Logo </h1>
</Col>
<Col lg={6} md={8} xs={6} style={cssCol}>
<h1 > Soluções Inteligentes </h1>
</Col>
<Col lg={4} md={12} xs={6} style={cssCol}>
<h1 > XXX</h1>
</Col>
</Row>
</Grid>
</header>
Note that it is possible to manipulate all the elements within the grid, in addition to being able to create infinite grids.
In my example, I tested different sizes of elements according to the user's screen, so it shows the components logo
, Soluções Inteligentes
and xxx
in different ways depending on the size of the device that the user is accessing, in this case the computer, tablet or cell phone, in that order.