when I resize my window my text is overlapping. How do I stop this from happening? I want it to just resize if it colliding with the other text elements or, if not possible, that they just stack under each other? problem
I already tried
- flex box
- set min height
and can someone tell me what position I should use mainly?
.flex_container {
display: flex;
flex-wrap: wrap;
min-width: 550px;
flex-direction: column;
position: relative;
}
.bar {
position: relative;
background-color: rgb(41, 80, 143);
border: 5px solid rgb(46, 84, 149);
height: 30px;
width: auto;
margin: 0;
}
.tekst {
color: white;
position: static;
text-transform: uppercase;
text-align: center;
margin: 0;
justify-content: center;
vertical-align: middle;
line-height: 30px;
font-family: Arial, Helvetica, sans-serif;
}
.ccontroller {
margin-top: -12px;
}
.creator1 {
font-size: 25px;
color: white;
text-align: left;
margin: 0;
justify-content: center;
vertical-align: middle;
line-height: 0px;
font-family: Arial, Helvetica, sans-serif;
}
.creator2 {
color: white;
font-size: 25px;
text-align: right;
margin: 0;
justify-content: center;
vertical-align: middle;
line-height: 0px;
font-family: Arial, Helvetica, sans-serif;
}
.aboutus {
margin: 0;
position: absolute;
top: 50%;
left: 25%;
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
color: white;
background-color: #123456;
height: 15px;
width: auto;
}
body {
background-color: #123456;
background-repeat: no-repeat;
background-position: center;
background-attachment: fixed;
background-size: 100% 100%;
min-width: 550px;
position: relative;
margin: 0;
padding: 0;
}
html,
body {
min-width: 550px;
position: relative;
margin: 0;
padding: 0;
}
<body>
<div class="flex_container">
<div class="bar">
<h1 class="tekst" title="Coffeesnakes">Coffeesnakes</h1>
<button class="aboutus" onclick="func()">About us!</button>
<div class="ccontroller">
<p class="creator1" title="Can code: Java, c#, html, js, python, arduino">Christian2B</p>
<p class="creator2" title="Can code: html, python, js ">Timgb11</p>
</div>
</div>
</div>
</body>