0

So am confused...is percentage higher than pixels? And why is height 100px and width 90px then the total is 100px..

Div{ border:5px solid green Width:90px Height100px How is the total width and height 100px??

11th Oct 2019, 1:18 PM
Jaina Jumoke
Jaina Jumoke - avatar
4 Answers
+ 2
Did you apply this somewhere. Both are higher to each other. It's depends on how you are using. Actually pixels is fixed size means it will not adjust with different screen size and percentage is variable type means if you define 80% so it will automatically resize your div and adjust with different screen size means it will not overflow the boundaries. In simple terms pixels takes reserved space. Here why total will come in picture. We never check total in CSS. So don't be confused.
13th Oct 2019, 10:27 AM
A͢J
A͢J - avatar
+ 1
Are you understanding that CSS is math? Why you are adding them. What is your actual problem.
12th Oct 2019, 9:38 PM
A͢J
A͢J - avatar
0
So.. is ur reply supposed to help erase my confusion or add more to it.. Like iffu wia nt ready to help out, u could av jus ignored it.
13th Oct 2019, 9:45 AM
Jaina Jumoke
Jaina Jumoke - avatar
0
Thanks..now i understand Thanks for your help
13th Oct 2019, 11:24 AM
Jaina Jumoke
Jaina Jumoke - avatar