Friday, May 17, 2024
HomeCSScss - Div dimensions change on window resize

css – Div dimensions change on window resize


I’ve a container div in flex that accommodates a colored rectangle on the left and a few textual content on the best.
The crimson rectangle has fastened width and peak.

When the person resize the window, the scale of the rectangle develop into smaller. Why? It’s set as 50px.

What am I lacking? What’s the proper technique to have at all times the rectangle with the identical dimensions?

.container {
  border: 1px stable black;
  show: flex;
  align-items: heart;
}

.image {
  width: 50px;
  peak: 30px;
  background-color: tomato;
  margin-right: 10px;
}
<div class="container">
  <div class="image"></div>
  <div class="textual content">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce suscipit iaculis risus ut porta</div>
</div>
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments