0

I want to display two divs besides each other and using the full width of the parent div. My Problem is when i set the left width to 25% and the right div to 75% the second div is getting wrapped in the next line. When i use 25% and 74% it is working but its not using the whole width of the parent div.

Can someone help me?

<div style="margin-top:40px;">
        <div style="width:25%;display: inline-block;">
            <span style="vertical-align: super;"><b>Anmerkungen:</b></span>
        </div>
        <div style="width: 74%;display: inline-block;">
            <div style="border-bottom-color:black;border-bottom-style:solid;border-bottom-width:1px;width:100%"></div>
        </div>
    </div>

I also had made some pictures but i cant display them cause stackoverflow is telling me that my post contains code without code indent. Pictures in the first comment

z3rp436
  • 1
  • 2
  • [Wrong layout with 25% and 75%](https://i.imgur.com/Vy5YNi7.png) [html text](https://i.imgur.com/9xka89p.png) [Right layout but not using the whole width 25% and 74%](https://i.imgur.com/Y4g5FRM.png) – z3rp436 Feb 19 '21 at 10:47
  • Use `float: left;`instead of `display: inline-block;` for the div "Anmerkung" – GucciBananaKing99 Feb 19 '21 at 10:49
  • @GucciBananaKing99 That thing with font-size: 0 works. Sry for useless question – z3rp436 Feb 19 '21 at 10:54

0 Answers0