I am having trouble centering an anchor on my webpage. I have tried using text-align: center;
, but it always puts the link on a new line due to the required div element. Other methods like margins and spans have not worked for me either.
span.right {
float: right;
}
<form action="login.py" method="post">
<div class="container">
<label for="username">
<b>Username</b>
</label>
<input type="text" placeholder="Enter Username" name="uname" required>
<label for="pword">
<b>Password</b>
</label>
<input type="password" placeholder="Enter password" name="pword" required>
<button type="submit">Login</button>
<label>
<input type="checkbox" checked="checked" name="remember"> Remember me
</label>
<a class="link-secondary" href="#">Sign up?</a>
<span class="right"><a class="link-secondary" href="#">Forgot password?</a></span>
</div>
</form>
This is what the html looks like, and I want to position the span containing "sign up?" accordingly.
Thank you.