A day in the life of a Junior Web Designer
Getting started with Bootstrap
This is the HTML for a Navbar component, which we want to look like this:
Click Preview to see the code in action.
Hang on. That doesn’t look right. We haven’t told the browser that we are using Bootstrap, so it doesn’t know how to display the Navbar.
We tell the browser we are using Bootstrap, by including links to the Bootstrap files in the section of the page that has information for the browser - the <head></head>.
Paste this line into the code below on line 3 between the <head> and </head> and then click to Preview the code again:
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
This will tell the browser to use the Bootstrap stylesheet.
Something's not quite right. Try again. Copy the code and paste it into line 3.
This is better, but it still isn't quite the same as our design:
We need to replace the text that says the name of the site with an image.
Look for class="navbar-brand" on line 9, highlight the site title, iDEA, and paste this code over it:
<img src="idea-logo.png" alt="iDEA" height="20" />
Top tip: Did you know you can double click the a word to highlight all of it? Try double-clicking iDEA on line 9 to highlight it.
Perfect. So on this page we've done two things - we've added a style sheet so the page looks a certain way and we've used an image which we can use for navigation. Ok, let's crack on.