-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Bootstrap Site Blueprints

Find the logo.png
file in the img
folder. You may notice that its dimensions are large, 900px wide. In our final design, it will be only 120px wide. Because the pixels will be compressed into a smaller space, this is a relatively easy way to ensure that the image will look good in all devices, including retina displays. Meanwhile, the file size of the image, which has already been optimized for the Web, is only 19 KB.
So, let's put it in place and constrain its width.
Open index.html
in your editor.
Search for this line within the navbar markup:
<a class="navbar-brand" href="index.html">Bootstrappin'</a>
Replace Bootstrappin'
with this image tag, including its alt
and width
attributes.
<img src="img/logo.png" alt="Bootstrappin'" width="120">
Be sure to include the width
attribute, setting its width to 120px. Otherwise, it will appear very large on the page.
Save index.html
and refresh your browser. You should see the logo in place.
You may notice that the...