I have a image icon inside a image container. The image container width and image position is varying in different pc and os. How to achieve this.
My image container below
liveContainer: {
width: "45%",
height: "20%",
top: "45px",
display: "flex",
justifyContent: "center",
alignItems: "center",
borderRadius: "4px",
backgroundColor: theme.palette.background.white,
position: "absolute",
}
The image styles are as below
Live: {
position: "absolute",
top: "2px",
backgroundColor: theme.palette.background.red,
color: theme.palette.button.primary.contrast,
border: "1px solid " + theme.palette.background.red,
height: "12px",
fontSize: "8px",
fontWeight: "bold",
padding: "0px 3px",
borderRadius: "3px",
}
react-jsx code
<div className={classes.liveContainer}>
<span className={classes.Live}>LIVE</span>
</div>
.liveContainer {
width: 45%;
height: 20%;
top: 45px;
display: flex;
justify-content: center;
align-items: center;
border-radius: 4px;
/*background-color: theme.palette.background.white;*/
background-color: white;
position: absolute;
}
.Live {
position: absolute;
top: 2px;
/*background-color: theme.palette.background.red;
color: theme.palette.button.primary.contrast;
border: 1px solid + theme.palette.background.red;*/
background-color: red;
border: 1px solid red;
height: 12px;
font-size: 8px;
font-weight: bold;
padding: 0px 3px;
border-radius: 3px;
}
<div class="liveContainer">
<span class="Live">LIVE</span>
</div>
need to achieve the container style without the width and height. Is that possible kindly help me.