D
D
Denioo2019-10-27 13:50:47
css
Denioo, 2019-10-27 13:50:47

How to align text and konka inside a block?

Hello, I can’t figure out how to center the icon and the text after it, while it turns out like this:
5db5761e72d46730756510.png
but it should be like this:
5db5760263778058120350.png
Code:

<div class="dropdown__info__checkbox">
                    <input type="checkbox" class="hide__info" id="info_1">                    
                    <label for="info_1"><i class="material-icons">trending_up</i>Statistics</label>
                    <div class="information"><div><img src="./img/pt.png" alt=""><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in</p></div></div>
                </div>

Sass
.dropdown__info
            margin: 0 400px 0 400px
            .dropdown__info__checkbox
                text-align: start
                width: 100%
                height: 100% 
                margin-top: 20px                                      
                .material-icons
                    display: flex
                    vertical-align: middle
                    padding-right: 20px
            .hide__info
                display: none
                width: 100%
            .information
                display: none
                padding: 15px
            .information div
                display: flex     
            .hide__info:checked + label + .information
                display: block 
                background: #ffffff
                box-shadow: 0 2px 5px rgba(0, 0, 0, 0.13)
                border-radius: 5px                             
            .hide__info + label                
                display: flex
                justify-content: flex-start
                border: 1px solid #ffffff
                width: 100%
                box-shadow: 0 2px 5px rgba(0, 0, 0, 0.13)
                height: 50px
                border-radius: 5px
            &__checkbox label
                cursor: pointer

https://jsfiddle.net/5zpkv2ry/1/

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
ildar-meyker, 2019-10-27
@Denioo

Prepare your example at https://jsfiddle.net/.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question