mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-26 23:54:23 +01:00
add examples of images in the navbar-brand section
This commit is contained in:
parent
a3df8ca35a
commit
c7ad18117d
@ -76,6 +76,27 @@ The `.navbar-brand` can be applied to most elements, but an anchor works best as
|
|||||||
</nav>
|
</nav>
|
||||||
{% endexample %}
|
{% endexample %}
|
||||||
|
|
||||||
|
Adding images to the `.navbar-brand` will likely always require custom styles or utilities to properly size. Here are some examples to demonstrate.
|
||||||
|
|
||||||
|
{% example html %}
|
||||||
|
<!-- Just an image -->
|
||||||
|
<nav class="navbar navbar-light bg-faded">
|
||||||
|
<a class="navbar-brand" href="#">
|
||||||
|
<img src="{{ site.baseurl }}/assets/brand/bootstrap-solid.svg" width="30" height="30">
|
||||||
|
</a>
|
||||||
|
</nav>
|
||||||
|
{% endexample %}
|
||||||
|
|
||||||
|
{% example html %}
|
||||||
|
<!-- Image and text -->
|
||||||
|
<nav class="navbar navbar-light bg-faded">
|
||||||
|
<a class="navbar-brand" href="#">
|
||||||
|
<img src="{{ site.baseurl }}/assets/brand/bootstrap-solid.svg" width="30" height="30" class="d-inline-block">
|
||||||
|
Bootstrap
|
||||||
|
</a>
|
||||||
|
</nav>
|
||||||
|
{% endexample %}
|
||||||
|
|
||||||
### Nav
|
### Nav
|
||||||
|
|
||||||
Navbar navigation is similar to our regular nav options—use the `.nav` base class with a modifier to achieve a particular look. In this case you'll want `.nav.navbar-nav`.
|
Navbar navigation is similar to our regular nav options—use the `.nav` base class with a modifier to achieve a particular look. In this case you'll want `.nav.navbar-nav`.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user