Skip to content

Instantly share code, notes, and snippets.

@teffcode
Created June 7, 2020 05:36
Show Gist options
  • Select an option

  • Save teffcode/25abade04efdca87f8145bb71bf93dd2 to your computer and use it in GitHub Desktop.

Select an option

Save teffcode/25abade04efdca87f8145bb71bf93dd2 to your computer and use it in GitHub Desktop.

馃憢馃徏 Welcome 馃憢馃徏

Quiz banner

Instagram | Twitter | LinkedIn


馃憛 Choose your language



馃殌 English version


Consider the following code:

CSS HTML

What is the size of the baby element ?


  A. width: 200px; height: 100px;
  B. width: 200px; height: 200px;
  C. width: 100px; height: 100px;


馃憖 Click here to see the correct answer and explanation
Correct Answer Explanation
B 馃帀 Margin and Padding in percentages are calculated by the width of the parent element.

Explanation based on 馃憠馃徏 Oh Hey, Padding Percentage is Based on the Parent Element鈥檚 Width



馃殌 Spanish version


Considera el siguiente c贸digo:

CSS HTML

驴 Cu谩l es el tama帽o del elemento baby ?


  A. width: 200px; height: 100px;
  B. width: 200px; height: 200px;
  C. width: 100px; height: 100px;


馃憖 Haz click aqu铆 para ver la respuesta correcta y su explicaci贸n
Respuesta correcta Explicaci贸n
B 馃帀 El margin y el padding en porcentajes se calculan por el width del elemento padre.

Explicaci贸n basada en 馃憠馃徏 Oh Hey, Padding Percentage is Based on the Parent Element鈥檚 Width



@cquiladiaz
Copy link
Copy Markdown

Nunca us茅 el padding Las 100%, pero supongo que la opci贸n correcta es A, ya que tomar铆a el 100% de su contenedor padre

@cquiladiaz
Copy link
Copy Markdown

Uhh en esta fall茅, no tenia idea que % en el padding tomaba como referencia el Width padre

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment