why the vertical-align: middle affects the buttons

Viewed 18

why the paragraph style affects the buttons i styled the buttons the be in the middle vertically but it didn't work only top and bottom worked correctly but when i styled the paragraph it worked please take notice that the paragraph element and the button elements are completely separate entities there is no element nested inside the other

<style>
  p {
    width: 200px;
    display: inline-block;
    vertical-align: middle;
  }
</style>

<body>
  <p>
    thanks for chatting with our customer support. would you like to take our quick survey?
  </p>
  <button>Yes</button>
  <button>No</button>
</body>

0 Answers
Related