Currently Browsing

Uncategorized

Bootstrap3 clickable dropdown navbar link

HTML

<ul class="nav navbar-nav pull-left">
	<li class="dropdown">
		<a class="dropdown-link" href="#">Menu link</a>
		<a class="dropdown-toggle" data-toggle="dropdown"><b class="caret"></b></a>
		<ul class="dropdown-menu">
			<li><a href="#">Submenu link</a></li>
		</ul>
	</li>
</ul>

LESS

.nav
{
	.dropdown
	{
		.dropdown-link
		{
			float: left;
			padding-right: 0;
		}
		.dropdown-toggle
		{
			float: left;
		}
	}
}

compressed CSS

.nav .dropdown .dropdown-link{float:left;padding-right:0}.nav .dropdown .dropdown-toggle{float:left}
Share