Click here to Skip to main content
13,509,783 members
Click here to Skip to main content
Add your own
alternative version


7 bookmarked
Posted 29 Oct 2013

Web Site Extreme Makeover, Part 4 of 7

, 2 Nov 2013
Rate this:
Please Sign up or sign in to vote.
In part 4 of the "extreme makeover", we add some pages and perform some light cosmetic enhancements


We've made it to the fourth installment of “Web Site Extreme Makeover”, and we are starting to get warmed up now – the web site, at least the home page, probably looks pretty much like what the end result will be. But we will continue to add some “gingerbread” to the home page to try to make it more visually striking, or at least appealing.

Continuing On

First, I replace the text below the company name with “Serving the Highway 99 corridor between Modesto and Merced in California's San Joaquin Valley since 1971”

Next, I want to set off the footer from the rest of the page – it all blends together right now. So I'll give that a different background color.

To do that, I add a rule for background color to my footer CSS tag so that it is now:

footer {
  position: relative;
  background-color: lightskyblue;

Since this is an HTML5 tag name (as opposed to a self-named CSS class), I don't need to add a "class="footer"" to the footer - any footer in the site will inherit these rules automatically. And, since an HTML5 footer does exist in Site.Master, any page that references Site.Master will inherit that same footer. IOW, this directive:

MasterPageFile="~/Site.Master" this line at the top of Default.aspx:

<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.Master" 

AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="HarttPools._Default" %>

...sees to it that Default.aspx uses Site.Master as its "Master Page", so that Default.aspx looks to Site.Master to provide a “starting point”, kind of like a business letterhead or a document template's formatting. The same inheritance is true for the other pages in the site (at least for now), such as "About", "Contact", etc.

This is how it now looks, with the change of verbiage below the company name and a background color added to the footer:

I think I'll move the credit card animated gif into the main section at the top; where it is now, it looks as if it may be my business that accepts those particular credit cards, not Hartt's Pool Plastering (the footer section is sort of “my” section, where I'm advertising my business with my logo on the far left with the Web site copyright notice, and also the Humans.txt link opens a simple text page, which has my contact info for anybody who wants a new or revamped web site built for them).

So, I move the animated gif into the business name section, from the footer in Site.Master to the first div in Default.aspx.

I now add an “Images” menu item, as there are many of those to be displayed in addition to the 8-image animated gif displaying in the middle of the home page. To do this, I add another list item to the section in Site.Master where the menu items appear, specifically:

<li><a runat="server" href="~/Images">Images</a></li>

...and add a page named Images by right-clicking the project, selecting Add > Web Form, and naming it “Images”

When I run the site now, though, I see that the credit card gif is way too far to the right. I remove the “class="east-magnet"” to see where the gif will end up then...Okay, that's better – it's below the text, instead of being way out in “right field” (from the batter's/onlooker's perspective). I will also give that section a background color to set it off from the middle section, too, similar to the footer. Since I can't apply the rule to a div (I don't want to change the background color of all the divs), I create a new CSS class with just the background color:

.backgroundcolorLightSkyBlue {
  background-color: lightskyblue;

...and assign that class to the div, adding it to the pre-existing “jumbotron” class (placed there by the project's usage of the Bootstrap framework):

<div class="jumbotron backgroundcolorLightSkyBlue" >

That works fine, so I then add “class=“backgroundcolorLightSkyBlue”” to the footer, and delete the background-color directive from the footer CSS declaration so that it is now simply this:

footer {
  position: relative;
  background-color: lightskyblue;

Finally (maybe?), I make one more change. I add a CSS class that will set a font's color to azure (which basically seems to be a fancy name for “White”):

.fontcolorAzure {
    color: azure;

...and add that class to the verbiage below the company name:

<p class="lead fontcolorAzure">Serving the Highway 99 corridor 
   between Modesto and Merced in California's San Joaquin Valley since 1971</p>

(“lead” was already there, added by Microsoft/Bootstrap)

That's enough for the home page, at least for now; here's what it looks like after this installment's improvements (this screen shot catches the credit card animated gif in mid-morph):

Signing Out for Now

That's all for this time, folks! Happy trails, until we meet again in the next segment of this thrilling series of “As the Web is Woven” (or whatever it's called).


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

B. Clay Shannon
Founder Across Time & Space
United States United States
I am in the process of morphing from a software developer into a portrayer of Mark Twain. My monologue (or one-man play, entitled "The Adventures of Mark Twain: As Told By Himself" and set in 1896) features Twain giving an overview of his life up till then. The performance includes the relating of interesting experiences and humorous anecdotes from Twain's boyhood and youth, his time as a riverboat pilot, his wild and woolly adventures in the Territory of Nevada and California, and experiences as a writer and world traveler, including recollections of meetings with many of the famous and powerful of the 19th century - royalty, business magnates, fellow authors, as well as intimate glimpses into his home life (his parents, siblings, wife, and children).

Peripatetic and picaresque, I have lived in eight states; specifically, besides my native California (where I was born and where I now again reside) in chronological order: New York, Montana, Alaska, Oklahoma, Wisconsin, Idaho, and Missouri.

I am also a writer of both fiction (for which I use a nom de plume, "Blackbird Crow Raven", as a nod to my Native American heritage - I am "½ Cowboy, ½ Indian") and nonfiction, including a two-volume social and cultural history of the U.S. which covers important events from 1620-2006:

You may also be interested in...


Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.180417.1 | Last Updated 3 Nov 2013
Article Copyright 2013 by B. Clay Shannon
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid