So I'm trying to display my button more to the right. However, no matter what I try, I can't get it to move it beyond only a few positions. To generalize the million things I've been attempting and the outputs, the button displayed is always either:
when I have the opening tag,
<div className="container">
, the button is pretty far on left sideOr if I try as my opening tag as just
<div>
or<div className="btn-top-right">
, the button is completely on the left sideThe button here is positioned on the right, but a little too far for me. (https://i.stack.imgur.com/7dvJb.png)
Here's my current javascript/html + CSS:
<div className="container">
<button className="btn btn-primary btn-top-right float-end">CPU</button>
</div>
where I also tried <div>
and <div className="btn-top-right
> for the opening tag in the above^ code snippet.
.btn-top-right {
position: absolute;
top: 20px;
right: 50px;
}
.btn-top-right {
position: absolute;
top: 20px;
right: 50px;
}
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-geWF76RCwLtnZ8qwWowPQNguL3RmwHVBC9FhGdlKrxdiJJigb/j/68SIy3Te4Bkz" crossorigin="anonymous"></script>
<div class="container">
<button class="btn btn-primary btn-top-right float-end">CPU</button>
</div>
As you can see above, right is set to 50px, but no matter what value I try, it won't move. Any thoughts?