A
A
Artem2018-05-28 19:57:31
css
Artem, 2018-05-28 19:57:31

Bootstrap 4 stretch dropdown-menu, dropright?

Hello everyone, I can't figure out why the dropdown-menu doesn't seem to be able to stretch. There is a code like this

<div class="container">
    <div class="row">
        <div class="col-lg-3">
            <ul class="list-category">
                <li class="dropright">
                    <a href="#" class="dropdown-toggle nav-link" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">cat.link</a>
                    <ul class="dropdown-menu">
                        <div class="row">
                            <li class="col-lg-4"> <a href="#">Link</a></li>
                            <li class="col-lg-4"> <a href="#">Link</a></li>
                            <li class="col-lg-4"> <a href="#">Link</a></li>
                        </div>
                    </ul>
                </li>
            </ul>
        </div>
        <div class="col-lg-9">
            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 voluptate velit esse
            cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
            proident, sunt in culpa qui officia deserunt mollit anim id est laborum.   
        </div>
    </div>
</div>

looks something like this:
5b0c342b5e86a595157778.png
dropdown-menu under no circumstances accepts width:100%;
Presumably due to the fact that it lies in how to get around, I don’t understand, I have already tried a bunch of standard options, maybe someone knows other tricks, share, thanks!
<div class="col-lg-3"></div>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Shamanov, 2018-05-29
@SilenceOfWinter

dropdown-menu has a fixed width, so you need to change it for this case.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question