body {
margin: 0px;
background: #eee;
font-family: Arial, Helvetica, sans-serif;
}
#navigation {
position: fixed;
z-index: 9;
top: 0;
left: 0;
width: 100%;
background: white;
padding: 10px 0px;
}
#navigation-inside {
width: 600px;
margin: 0 auto;
}
#navigation-inside ul {
width: 100%;
list-style: none;
text-align: center;
margin: 0px;
padding: 0px;
}
#navigation-inside li {
width: 25%;
float: left;
}
a {
color: #333;
text-decoration: none;
}
a:active, a:hover {
color: #1998E2;
}
.active {
color: #1998E2;
font-weight: bold;
}
Note: some of these concepts we haven’t seen before, such as list-style overriding. Hopefully you were able to search online and find the solution to this issue by yourself. The only way to truly grow as a developer, is to accept that you can’t ever know everything in this constantly evolving field, and that an essential part of becoming a good web developer is knowing how to find and learn ways of overcoming the issues you face with your code.
Let’s now turn our focus to the header section of the page. The goal here is to create a full-width banner image, which is overlaid with a circular profile picture/icon, and your name. Part of this banner will sit underneath the navigation bar, as the navigation bar is fixed over the top of all of our content. This is fine and expected behaviour.
The steps:
Write rules to achieve the following desired output per element:
Expected result: after writing the necessary rules above to satisfy the challenges set, we should end up with a big and wide profile image with our profile icon centred over the top.
Expected code: