What will this code do?? nav { padding: 50px 0; min-width: 500px; } | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What will this code do?? nav { padding: 50px 0; min-width: 500px; }

I want to know what will this code do.... I can't see any difference made by this code..

17th Feb 2018, 4:07 AM
Sachin Kumar
Sachin Kumar - avatar
3 Answers
+ 1
Your navigation will have 50px padding on the top and bottom and 0px padding left and right of it. The min-width property defines the minimum width of an element. If the content is smaller than the minimum width, the minimum width will be applied. If the content is larger than the minimum width, the min-width property has no effect.
17th Feb 2018, 5:25 AM
Ryan
0
can you tell me the meaning of padding
17th Feb 2018, 7:19 AM
Sachin Kumar
Sachin Kumar - avatar
0
Padding creates space around your content so no other content can touch it. This link describes it well. https://youtu.be/51w2R6hYolo
17th Feb 2018, 5:58 PM
Ryan