Could some1 explain css propery the ' width' especially when it is accompanied by this kind of value 'calc()'. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Could some1 explain css propery the ' width' especially when it is accompanied by this kind of value 'calc()'.

For example . ''width: calc(20% - 50px);

4th Oct 2019, 11:53 PM
Rence's
Rence's - avatar
1 Answer
+ 2
https://code.sololearn.com/W4F2NOmpiS75/?ref=app width is horizontal size of element calc is a function to use arithmetic operations, each operator must have space before and after it. px is fixed unit, one dot on screen. % is relative size to its direct parent. https://code.sololearn.com/WrgbrFC038ma/?ref=app
5th Oct 2019, 4:02 AM
Gordon
Gordon - avatar