Display Inline-Block with Widths as Percent

前端 未结 1 515
后悔当初
后悔当初 2020-12-16 16:00

I\'m trying to put 2 sections beside each other using inline-block and widths as a percentage, but it\'s not filling up the entire width of my window.

W

相关标签:
1条回答
  • 2020-12-16 16:40

    It is due to the white-space and line break in your HTML markup which causes this issue. There are two options to resolve the "problem":
    1. remove the line breaks and white-space from your code
    2. set the font-size of the parent element to '0'

    Additionally have you set box-sizing: border-box?

    0 讨论(0)
提交回复
热议问题