I've been working on this project for awhile, an article that holds multiple items within it. However, when resizing the web page to a smaller size, the "player-summary" class is pushed into the section with the "name" class. This is despite the "name" class having a fixed width of 250px. I'm not quite sure how to fix this so resizing the web page won't bleed into it.
Additionally, when resizing, why does my text overflow out of my container?
html,body{
width: 100%;
height: 100%;
}
.center{
width:90%;
margin: auto;
}
.big-board_inner{
width: 80%;
margin: auto;
background-color: white;
}
article{
border: solid 1px;
border-radius: 10px;
}
.top-info{
display: flex;
flex-direction: row;
width:100%;
height: 100%;
font-size: 15px;
}
.name{
display: block;
width: 250px;
margin: .3em;
padding-right: 3em;
font-size: 20px;
padding-left:.5em;
}
.player-summary{
margin: .5em;
padding-right: 2em;
}
.age{
margin: .5em;
border-left: solid 1px;
padding-left: 1em;
}
.main-info{
width: 50%;
display: flex;
flex-direction: column;
}
.profile img{
width: 250px;
height: auto;
border-radius: 15px;
padding: .5em;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class = "center">
<div class = "big-board_inner">
<article>
<div class="top-info">
<div class = "name">Dustin Harris <br> OF - Tex </div>
<div class="player-summary">Summary: <br>Dustin Harris is as pure as hitter you can find, with a LF fit</div>
<div class="age">Highest Level: A+ <br> Age: 21</div>
<div class="age">Height: 6'1" <br> Weight: 215 lbs</div>
</div>
<div class="main-info">
<div class="profile"> <img src="images/Dustin Harris.jfif"></div>
</div>
</article>
</div>
</div>
</body>
</html>