2021年3月27日星期六

Align text CSS/HTML

I have this code on HTML:

<div class="submissions">            <div class="register"><a class="log" href="#" style="margin-right: 100px;">Register</a></div>            <div class="login"><a class="log" href="#" style="margin-left: 100px;">Login</a></div>  </div>  

And this one in CSS:

.register {    background-color: red;    width: 500px;    float: left;  }    .login {    background-color: blue;    width: 500px;    float: left;  }    .log {    text-decoration: none;    font-family: 'Mulish', sans-serif;    font-size: 20px;    color: #fff;  }  

And the login text aligns in fact 100px with margin-right, but the register text doesnt align 100px with the margin-right, how can i fix this? Image: here (Used red and blue colored divs for easier visualization.)

https://stackoverflow.com/questions/66837809/align-text-css-html March 28, 2021 at 10:07AM

没有评论:

发表评论