1

I am building a small web application,In the layout there is a grid with 2 rows so I have given

The issue i have found out is that the percentage in terms of grid template rows is working fine in macos,windows,linux but when it comes to ubuntu V18.04 the mess in the layout is taking place. Any help would be good.

.class_Name{
display: grid;
grid-template-rows:75% 25%;
height: 100vh;
}
  • Did you try that layout using `flex` then check that on ubuntu – Awais Apr 20 '20 at 05:44
  • No i did not but the wired thing that i found is if i replace the % with a calc function with the height to be calc(0.75*100vh) calc(0.25*100vh) it's working across ubuntu as well. Now the question is how different is the interpretation from % to calc? – krishna chaitanya Apr 22 '20 at 07:10
  • both are different in thier context may be this would help you https://stackoverflow.com/questions/55658461/percentage-value-in-css-calc Do let me know if its not clear – Awais Apr 22 '20 at 07:59
  • I could understand that calc is used to evaluate different kinds of units and a simple unit with % in calc and a normal % would'nt make difference..Thanks for the point.. But the interpretation here must be from the perspective of grid-template-rows i mean did it not calculated the expression when given in % and in calc it did.? .. Please correct me if i were wrong or if anything doesn't make sense.. – krishna chaitanya Apr 22 '20 at 11:52
  • As i am not much familiar with Ubuntu environment but i would say calc is a function which uses % rem px etc as unit. – Awais Apr 22 '20 at 13:32

0 Answers0