Technical documentation navbar help

Sorry, I couldn’t get you. what is with the percentages.?

1 Like

I mean when I am using percentages for the height,scrolling only work in dev tools,is there a reason for that ?

No, won’t be like that i guess you might want to refresh the page, we use percentages for responsiveness and px for a fixed size, it works in px too, it shows the output based on the input, it has nothing to do with percent or px

1 Like

I think I understand it now,percentages unit is relative to the parent width and height,so 55% is not the same across some device,am I right ?

Yeah, that’s correct, 55% gets adjusted based on the device width, so in mob device, it stay as 55% based on the width of mob and likewise for desktop too, you’re correct

1 Like

Thank you so much for the answer,and two more question,sorry if I ask too much hehe,when is the best case to use percentage unit and what unit you use most for responsive website ?

When you need an element to be responsive, you should use percentage or else px, for example logos are usually small, so if you apply percent for the logo, it will be very small in mob, in that case px works better, again to the first point, elements which you feel should be responsive must be in percent if not then use px

% is relative to the parent

1 Like