I have a dropdown button that serves as the site menu, but it is in the right corner of the site and ends up leaving the screen, follow the problem:
Iwantittostayinsidethescreenwithoutcreatingahorizontalscrollbarbecauseofthemenu.Thesiteisresponsive,soincaseithastofitthescreen.
Followthecode:html:
<divclass="dropdown">
<button type="button" class="botao" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<div class="botao_dropdown">
<i class="fa fa-bars" style="font-size: 1.5em;"></i>
</div>
</button>
<ul class="dropdown-menu estilo_dropdown" aria-labelledby="dropdownMenu1">
<li class="opcoes">
<a href="<?php print base_url(); ?>social">Ações Sociais</a>
</li>
<li class="segundo_submenu">
<a href="<?php print base_url(); ?>blog">Blog</a>
</li>
<li class="segundo_submenu">
<a href="<?php print base_url(); ?>contato">Contato</a>
</li>
<li class="segundo_submenu">
<a href="<?php print base_url(); ?>educacional">Espaço Educacional</a>
</li>
<li class="segundo_submenu">
<a href="<?php print base_url(); ?>eventos">Eventos Sociais</a>
</li>
<li class="segundo_submenu">
<a href="<?php print base_url(); ?>galeria_fotos">Galeria de Fotos</a>
</li>
<li class="segundo_submenu">
<a href="<?php print base_url(); ?>institucional">Institucional</a>
</li>
</ul>
</div>
CSS:
.dropdown-menu>li>a {
color: $branco;
font-size: 15px;
padding: 0.7em;
padding-left: 1em;
}
.dropdown-menu>li>a:hover {
color: $laranjado;
font-size: 15px;
padding: 0.7em;
padding-left: 1em;
}
.open>.dropdown-menu {
width: 20em;
}
.estilo_dropdown {
@extend .gradiente;
li {
color: $laranjado;
}
}
.estilo_dropdown:hover {
background-color: $branco!important;
li {
color: $laranjado;
}
}