Make a Website (Boundaries and Space)

Good day guys , i have an enquiry regarding Exercise 7 of Make a Website (Boundaries and Space).
I would appreciate your help alot.

Here is the link :

On the Tundra Gallery homepage, notice the navigation bar (navbar) on the bottom left.

In index.html, this is represented by a nav element containing a ul with three list items. Read through the HTML and locate this code.

In main.css locate the nav li selector. Give it a display property of inline.

Click Run and notice the change in the web browser. List items, which are normally displayed as block-level elements, display inline within the navigation.

Question: Why was the inline property applied to nav li selector, and not the ul li selector?

if you do ul li as selector, then all unordered list on page become inline. This maybe undesired.

Plus, using nav in your selector, you know this selector applies to the nav section of your page. This is very handy when your website grows in size. if you just did ul li, you have no idea later on which list this applies to

1 Like

Thank you for your enlightenment

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.