navbar and container

Why doesn't the list come next to the logo??
No description
No description
No description
6 Replies
ChooKing
ChooKing3mo ago
The navbar only has one child. I see what you are trying to do with flex, but that has to be done to container and not navbar.
Abeer2003
Abeer20033mo ago
i got it thanks! but if i add flex to container فhis will not be true for the rest of the page .......I fixed it like this...is there a better way? .x{ display: flex; justify-content:space-between; }
No description
ChooKing
ChooKing3mo ago
The container only had two children before you made your edit. They were logo and list. That does not affect the rest of the page. You did not need to create another div to prevent affecting the rest of the page. I think part of the problem is your bad indents. It makes it difficult to see which closing div matches which opening one. Also, container is a child of navbar. It would not make sense to put the entire page contents as grandchildren of nav, so it would still not make sense how applying flex to a child of nav would affect the rest of the page.
CHUIS✩
CHUIS✩3mo ago
For my experience I suggest you to add your a elements outside the li elements <a><li></li></a>
clevermissfox
clevermissfox3mo ago
Semantically though Li's are the only tags that can direct children of ol or ul. What advantage do you find by using the anchor tag wrapping the li?
Mannix
Mannix3mo ago
that ain't a valid syntax my guy 🙂