button 안의 span 위치 조정 채택완료

3699153224_1699514266.0591.png

버튼을 만들고 있습니다만 보다싶이 시작이라는 글자가 아래로 내려가있습니다

img 옆, 버튼 가운데 줄 쯤에 시작 글씨를 두고 싶은데 무엇을 해야할까요??

 

이건 저 부분의 html입니다

Copy
<!--html-->

    <div id="toolbar">

        <div class="toolbar-start-menu">

            <button type="button">

                <div id="start-button">

                    <img src="../img/windows-0.png">

                    <span>시작</span>

 

                </div>

 

            </button>

        </div>

    </div>

 

그리고 이건 저 부분의 css 입니다

Copy
.toolbar-start-menu {

        /*시작메뉴*/

        float: left;

 

        display: flex;

        justify-content: space-around;

        align-items: center;



 

    }

 

    span {

 

        font-weight: bold;

        padding-top: 0;

        font-size: 14px;

    }

 

    button {

 

        user-select: none;


 

        display: flex;

        align-items: baseline;

        line-height: 2px;


 

        padding-right: 5px;

        height: 29px;

        margin: 2px 3px;

    }
 

 

 

답변 2개

채택된 답변
+20 포인트

Copy
<style>

#start-button{display: flex;align-items: center}

</style>
로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

도움 주셔서 정말 감사합니다!

댓글을 작성하려면 로그인이 필요합니다.

1. vertical-align: middle;

Copy
#start-button img {
        vertical-align: middle;
    }

 

2. display: flex;

Copy
#start-button {
        display: flex;
        align-items: center;
        gap: 0.4em;
    }
로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

도움 주셔서 정말 감사합니다!

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인
🐛 버그신고