I want to make a div that is centered (horizontally and vertically). It should change size with the screen, but have 5 pixel margins all around.
#thediv {
position: absolute;
top: 10px;
right: 10px;
bottom: 10px;
left: 10px;
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.