humblecoder humblecoder - 1 month ago 9
CSS Question

Bootsrap allign an item to left of a button

I want to allign

<div class="pull-right inside site-description ">
{% include "menu/menu-lang.html" %}
</div>


to left of

<a class="btn red_button" href="{% url 'user-login' %}">{% trans 'Log in' %}</a>`


How will i do it?

Answer

Make sure you are putting the code before the <a href... and change pull-right to pull-left:

<div class="pull-left inside site-description ">
   {% include "menu/menu-lang.html" %}
</div>

Also adding the class pull-right to the <a href... might be effective. Ultimately, your code should look this way:

<div class="pull-left inside site-description ">
   {% include "menu/menu-lang.html" %}
</div>
<a class="btn red_button pull-right" href="{% url 'user-login' %}">{% trans 'Log in' %}</a>