Width with percentage not working

as defined in lecture I’m adding width in view component with percentage sign but its giving error wdith:“50%”,

Which course or lecture are you referring to here ?