This is a follow-up from Attempting to adjust the position of my React button based on numerical values (##px) isn't effective?.
I am attempting to reposition a button on my webpage based on a specified value like ##px, but no matter what value I input, the button remains stationary at a few predetermined positions.
Upon inspecting the button element, it appears that the class btn-top-right
is missing. However, the classes btn
, btn-primary
, and float-end
are present in the button's styles/inspection.
Any insights? Dash.js:
import 'bootstrap/dist/css/bootstrap.min.css'; // Import the Bootstrap CSS file
import {Container, Row, Col } from 'react-bootstrap';
import init from './Svg'
import axios from 'axios'
import classes from './Dash.module.css'
const Dash = (props) => {
...
render() {
return (
<div className="container">
<button className="btn btn-primary btn-top-right float-end">CPU</button>
</div>
);
}
...
}
and Dash.Module.css:
.btn-top-right {
position: absolute;
top: 2000px;
right: 50000px;
}