why the paragraph style affects the buttons

Viewed 24

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 there is not element nested in the other

<style>
    p{
        width:200px;
        display:inline-block;
        vertical-align: middle;
    }
    
</style>
<body>
 <p>
    thanks for chatting with our costumer support. would you like to take our quick survey?
 </p>
 <button>Yes</button>
 <button>No</button>
</body>
0 Answers
Related