diff --git a/client/src/composition/DetailFeed/CommonModal.tsx b/client/src/composition/DetailFeed/CommonModal.tsx index 7a9a5f4a..1e218de6 100644 --- a/client/src/composition/DetailFeed/CommonModal.tsx +++ b/client/src/composition/DetailFeed/CommonModal.tsx @@ -5,7 +5,7 @@ import { ReactNode } from 'react'; const ModalFrame = styled.div` background-color: white; height: 80%; - position: fixed; + position: absolute; z-index: 2000; display: flex; `; @@ -21,12 +21,21 @@ const ModalBackgroud = styled.div` width: 100%; height: 100%; background: rgba(0, 0, 0, 0.8); + position: absolute; + top: 0; + left: 0; +`; +const Wrapper = styled.div` position: fixed; z-index: 1000; + width: 100%; + height: 100%; top: 0; left: 0; + display: flex; + justify-content: center; + align-items: center; `; - const CloseModal = styled.p` color: white; float: right; @@ -52,7 +61,7 @@ function Commonmodal({ setIsOpen(false); }; return isOpen ? ( - <> + X @@ -61,7 +70,7 @@ function Commonmodal({ {imageChildren && {imageChildren}} {textChildren} - + ) : ( <> );