Help with navbar

hello im new to html/css (started this week), and im working on a second tribute page
but im having trouble in getting the navbar to fullfill its entire row, its somehow lacking a piece in the left (dont know how to explain this)

i cant seem to figure out,

also how can i center the images on the footer?

here is the project

thank you.

It’s because your .nav-bar is inside the .container which has a max-width of 940px and 10px padding on both sides. If you want the background to fill the whole body horizontally, you should change the order of the divs. Swapping the .container and the .nav-bar will make your navigation full-width, while its content will sit in a container.

2 Likes

When using proportionate measurements (% or ems), a child element (in this case your .nav-bar div) takes the percentage off of its parent element.

For example, say your page is 1,000 pixels wide, if you put a div inside it that has the style property width: 50%, the width of that div will be 500px.

Now if we put another div inside the above one, and we put the same width property of 50%, will that div be 500px or 250px?

The answer would be 250px because it’'s setting its width to 50% of its parent element which in this case was only 500px.

1 Like