react jsx style with calc
If you need some more specific CSS you need to put it into quotes - react inline styles doc
<div style={{width: 'calc(100% - 276px)'}}></div>
In your exact case
customFormat = 'hello-div'
divStyle = {width: 'calc(100% - 276px)'}
return (
<div className={customFormat} style={divStyle}>
Hello World
</div>
)
In case you need to overwrite multiple widths (fallbacks) for browser compatibility
divStyle = {width: 'calc(100% - 276px)',
fallbacks: [
{ width: '-moz-calc(100% - 276px)' },
{ width: '-webkit-calc(100% - 276px)' },
{ width: '-o-calc(100% - 276px)' }
]}
Also in JavaScript:
- angular emit output
- javascript remove underscore and capitalize
- new fabric canvas set width
- XML
- javascript declare empty array
- jquery how to get form value event.target
- how to use cordova screen shot
- pdfjs get all the text present
- node sass version react
- create a node js project in with worker
- jquery cast to string
- javascript find total number of classes
- uninstall node package
- find leap year javascript
- javascript get width of image
- js document.getelementsbyclassname modify innertext
- unordered list in react native
- ignore all node_modules
- compare string length javascript
- js stairs algorithm
- jquery add input placeholder
- break loop timeout javascript
- access method globally js
- fileupload progress bar in axios