React js css inline style margin right not working
try this: way a)
let styles = {
marginRight: '20px',
width: '250px',
height: '250px',
backgroundColor: 'yellow',
};
<span style={styles} className="badge badge-pill badge-secondary">
way b)
<span style={{margin-right:"20px", width: '250px',height: '250px',background: 'yellow'}} className="badge badge-pill badge-secondary">
React uses camelCase for inline style properties. Try marginRight: '20px'
, just like you did with backgroundColor
.