0

I have a small issue with Twitter Bootstrap's dropdown buttons. I noticed that although it is possible to style the size of the buttons via .btn-large, .btn-small etc, the text style inside the dropdown does not change. For that matter, there doesn't seem to be any preset classes for text sizes other than headings and the small tag.

Is there any way I can change the style of the dropdown list to fit the button via the bootstrap classes (so small buttons get small text, mini buttons get mini text etc)? This must surely be an easy question yet I haven't been able to find a solution so far.

0

1 Answer 1

1

The font-size for the dropdown ul elements is set using the selector

.btn-group > .btn, .btn-group > .dropdown-menu, .btn-group > .popover { ... }

so it is not dependent on the button size; and the ul themselves are not given a class that corresponds to the button size class.

But you can select the list that follows a button with a specific class and set your own font-size, like this:

.btn-group > .btn-small ~ .dropdown-menu {
  font-size:10px;
}
Sign up to request clarification or add additional context in comments.

1 Comment

Oops, don’t know how that even got in there … updated my answer, thanks for the feedback!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.