I want to move a Picture in my websites header. It Should end up being in a line with the login and registration button (similiar to the stack overflow in the header - everything in line). I've been trying to solve this problem for hours, unfortunately nothing worked.
Header in html
<img src="/static/logo.png" alt="Start" class="header_logo" id="header_logo">
{% if session['loggedin'] %}
<button type="button" onclick="{{ url_for('logout') }}" class="header_logout">Logout</button>
{% else %}
<button type="button" onclick="{{ url_for('login') }}" class="header_login">Einloggen</button>
<button type="button" onclick="{{ url_for('register') }}"
class="header_register">Registrieren</button>
{% endif %}
the css file
.header {
position: fixed;
top: 0;
background-color: lightgrey;
width: 100%;
text-align: right;
display: inline-block;
font-size: 2vw;
}
.header_login {
background: lightcoral;
margin: 0;
padding: 10px 10px;
border-radius: 23px;
}
.header_register {
background: lightblue;
margin: 0;
padding: 10px 10px;
border-radius: 23px;
margin-right: 1%;
margin-bottom: 1%;
}
.header_logo{
width: 10%;
display: block;
left: 0;
}
I'd be happy if someone could help me. :)
Have you tried using "float" in the css? I'm thinking that you could use the "float:right;" on the login/logout buttons.