<div id=”header”>
<div id=”profile”>
<img src=”img/header-image.jpg” alt=“Header Image”>
<div id=”profile-image”>
<img src=”img/profile-icon.png” alt=”Profile icon”>
</div>
by Kenny Wood
</div>
</div>
Note: feel free to replace the profile icon with an actual picture of yourself. Just try to ensure that the image is cropped into a nice square that focuses on your head. A passport-type photo is what we’re aiming for here.
Now that we have created our HTML for the page, we are going to need to style the page to make it appealing to the user. For this section you are free to experiment with your own colour choices – just try to stick to the same rules as me for the actual layout, other than that, go wild! Our goal here is to create a nice-looking webpage with a fixed header at the top of the page, which will remain at the top regardless of the user’s position on the page, followed by a header image, which is then overlaid with your profile picture (or stock icon) and your name, followed by a content pane with a capped width that will help to ensure readability of our webpage (remember, long line-lengths make things difficult to read). Sounds confusing? Well then, let’s break it down into a few step-by-step sections. Give it a good go yourself, and if you really can’t manage, there’s always the expected code at the end to look through.
Let’s first style the navigation bar and page background.
The steps:
Expected result: what we should now expect to see is a navigation bar fixed to the top of the page, with equally spaced out menu items with dark grey text, with the home tile coloured blue to indicate that it is the coloured page. The navigation background should be white, and the links should be contained to a maximum width of 600px. On hovering over one of the links, the link should turn blue to indicate that it is a link.
Expected code: