Hey there, I'm still fairly new to web development and have a question regarding a registration page that is displayed as a floating div above the main page. How can I ensure that this div is centered in a responsive way?
The pages are separated and included in the header.
<?php
include ('includes/login.php');
include ('includes/register.php');
?>
Here is the CSS for my registration page:
#regScreen {
padding: 5 5 40px 5px;
margin: 0 auto;
position: fixed;
top: 5%;
left: 33%;
z-index: 10;
display: none;
background: #ebebeb;
}
#regScreen:target, #regScreen:target+#cover {
display: block;
opacity: 2;
}
#reghead {
background-color: #e2e1e1;
text-align: center;
display: block;
padding: 0px 0px 10px 0px;
}
I attempted to use a media query for my #regScreen:
@media (max-width: 300px) {
#regScreen {
width: 100%;
left:0%;
}
}
However, using media queries doesn't seem to recognize the page as responsive since it is already small. Please correct me if I am mistaken in my understanding.