I'd like to place html input tag and button tag on the same line.

Asked 2 years ago, Updated 2 years ago, 101 views

<!DOCTYPE html>
<html lang="ko">
<head>
    <meta charset="UTF-8">
    <title>Document</title>

    <style>
        /*ID Style*/
        #input_search{
            width: 400px;
            height: 40px;
            padding: 0px 0px 0px 0px;
            margin: 0px 0px 0px 0px;
            border: 1px solid #dfe1e5;
        }
        #input_search_button{
            width: 40px;
            height: 40px;
            padding: 0px 0px 0px 0px;
            margin: 0px 0px 0px 0px;
            border: 1px solid #dfe1e5;
        }

    </style>
</head>
<body>
    <input type="text" id="input_search" value="" placeholder="ISBN">
    <!-- <input type="button" value="JOIN"> -->
    <button id="input_search_button" type="button">
        <img src="/source/search.png" alt="">
    </button>
</body>
</html>

If you run the code above,

The problem of not aligning lines continues to occur. And if you adjust the margin value of button, the input box moves together, and on the contrary, when the margin value of the input box is set to negative, no change occurs. I've been thinking about it for over 5 hoursThank you in advance😂

html html5 css css3

2022-09-20 16:40

1 Answers

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.