I have 2 divs, when i added long text on div b with width: auto
that div cant change own width with own text! as you see the word Bar
goes to new line!
here my code:
<!DOCTYPE html>
<html>
<head>
<style>
.flex-container {
display: flex;
background-color: #f1f1f1;
}
.flex-container > div {
background-color: DodgerBlue;
color: white;
width: 100%;
margin: 10px;
text-align: center;
line-height: 75px;
font-size: 30px;
}
div.b{
width: auto;
}
</style>
</head>
<body>
<div class="flex-container">
<div class='a'>Blocked Content Foo</div>
<div class='b'>Long Text Bar</div>
</div>
</body>
</html>
I want to change size of div b which contain Long Text Bar when i wrote a long text. thanks