# Q : deference between em or rem ? <div class="boxes"> <div class="box-boxes"> </div> <div class="box-body"> </div> </div> body { font-size: 16px; } .boxes { font-size: 10px; } .box-boxes { width: 10em; /* 10 * 10, parent relation */ height: 10em; /* 10 * 10, parent relation */ background-color: red; } .box-body { width: 10rem; /* 16 * 10, body relation */ height: 10rem; /* 16 * 10, body relation */ background-color: blue; } em parents se relate karta hai. rem body relation se relate karta hai.
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up