Fixed search bar layout at the top, how to deal with the layout of button, images, and input?

as shown in the figure

clipboard.png
clipboard.png

what is the more reasonable layout of the buttons on the left and right sides?
the current solution is:
the first (add padding and background image to button to add icons):

<header>
    <p class="head_top">
        <button></button>
        <label for="search"></label>
        <input type="text" id="search" placeholder="">
        <button></button>
    

</header>

second (fill in the icon as the background of I):

    <p class="head_top">
        <button><i></i></button>
        <label for="search"></label>
        <input type="text" id="search" placeholder="">
        <button><i></i></button>
    

originally intended to use the font icon, but the designer has already produced the picture, but can only use the diagram to realize the left and right icons.
I hope that all kinds of colleagues, Tai Sin will provide a better and more reasonable layout or idea ~ o ( layout ) o

Apr.01,2021

you can imitate the font picture and use I to show it, but use the background to show the picture

or just use img


flex layout or picture floating, vertically centered tend to prefer flex layout


flexible layout is easier to use


this problem is serious, left and right button format is the same, are text + pictures, before I see your solution, I usually use the img tag to display this icon, and then the text uses span or something to install. The two outside a div, in order to save trouble, vertical center on the use of the upstairs several respondents said, the flex layout is done.
but after reading your answer, I feel that using flex layout is better than using your method. Both of the methods you provide are fine. If you have to choose, the first method does not introduce additional DOM elements, but solves the problem only through css, which is better in terms of performance. But in terms of code readability, the second takes precedence.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b40da7-2c54e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b40da7-2c54e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?