I'm using react-modal, and I cannot find any way to successfully set the position of the Modal. I'm using inline styles per examples online, but they have no effect. I'm doing exactly what I see working in the codepen example on the react-modal site, but it doesn't work in my app. Something is obviously different, but I cannot see what it is.
This is how I'm rendering the Modal:
render: function() {
return (
<Modal
bsSize={this.props.size}
aria-labelledby="contained-modal-title-lg"
show={this.props.show}
style={{ content : {top: '70%'}}}
onHide={this.hideModal}>
<Modal.Header>
<Modal.Title id="contained-modal-title-lg">{this.props.modalTitle}</Modal.Title>
</Modal.Header>
<Modal.Body>
{this.props.modalBody || this.modalBody}
</Modal.Body>
<Modal.Footer>
<Button onClick={this.hideModal}>Cancel</Button>
<Button bsStyle="primary" onClick={this.props.modalCallback}>{this.props.confirmButtonText}</Button>
</Modal.Footer>
</Modal>
);
I've tried many different values for the style property, but anything I set has no effect. I also tried without the bsSize
property, and that didn't work either. I just need the top border of the content to be somewhat lower, because it is opened on top of another modal in the same position, and I want it to be visually apparent that there are two modals open on the page. I'm using react-modal 3.3.1.