In this task you will use template content to add an email sign-up form to the single-web page 'Software Analytics' project you created earlier.
You can display a finished version of the project web page on GitHub by clicking the image below.
At the end of this Tutorial you will be able to:
If you have not already downloaded the HTML, CSS and image template files for use with this and your other projects, you can find the instructions at the link below.
You will begin by working with two HTML files:
If you have any other files open in Visual Studio, you may wish to close them.
This will help you to focus only on the two HTML files you will be working with.
Your email sign-up form will use a Font Awesome 5 icon. So you need to copy and paste the link to the Font Awesome stylesheet CSS file from the <head> section of the email sign-up form template file to the <head> section your index.html web page.
Your next step is to copy content from the form template file into your index.html web page.
You can now close the email-signup-form-template.html file.
Your next task is to work with two CSS files:
If you have any other files open in Visual Studio, you may wish to close them.
This will help you to focus only on the two CSS files you will be working with.
Your next step is to copy content from the email sign-up form template CSS file into your style.css web page.
You can now close the email-sign-up-form-template.css file.
Here are the final steps to updating your email sign up form.
<h3>Start your free trial</h3>
<p>Enjoy unlimited access for 14 days. No credit card required.</p>
<button id="btn-submit" type="submit" class="btn-submit">Try it free <i class="fas fa-arrow-right"></i></button>
/* == CTA button == */
.container-flexbox.hero-block a {
display: inline-block;
text-decoration: none;
padding: 12px 42px;
border-style: solid;
border-width: 4px;
margin: 32px 0;
border-radius: 50px;
font-size: 18px;
font-weight: bold;
text-transform: uppercase;
letter-spacing: 1px;
}
.container-flexbox.hero-block a:link,
.container-flexbox.hero-block a:visited {
color: #5ba745;
background-color: #fff;
border-color: #5ba745
}
.container-flexbox.hero-block a:hover,
.container-flexbox.hero-block a:active {
color: #fff;
background-color: #5ba745;
border-color: #5ba745
}
#email-signup-form #btn-submit {
color: #fff;
border: solid 2px #fff;
padding: 12px 22px;
background-color: #fff;
letter-spacing: 1px;
border-radius: 50px;
color: #5ba745;
}
#email-signup-form #btn-submit:hover {
color: #fff;
background-color: #5ba745;
border: solid 2px #fff
}
View your web page in your web browser. The email sign up form should look as below.
You can display a finished version of this project on GitHub by clicking the image below.
When you click the 'TRY IT FREE' button in he hero section, you can see that the page immediately 'jumps' to the email sign-up form at the bottom of the web page.
You can add a so-called 'smooth scrolling' effect to your CTA button as follows:
Note that the scroll-behavior: smooth effect works with the Google Chrome, Mozilla Firefox, Brave, Samsung Internet and Android Webview web browsers. However, it is not yet supported by the Microsoft Edge web browser. A new and major upgrade of Edge is planned for early 2020 and Microsoft are expected to fix this defect then. It is also not currently supported by the Apple Safari and Opera web browsers.
To check your HTML is correct, use the official W3C Markup Validation Service. Follow these steps.
To check your CSS is correct, use the official W3C CSS Validation Service. Follow these steps.
The final step is to upload your project to GitHub.
All the files for this project are in a sub-folder named software of your websites/portfolio folder.
So you will need to upload this software sub-folder, which contains both files and other sub-folders, to your account on GitHub.
Your 'Software' project web page with the email sign-up form is now published on GitHub at a web address similar to the following, where username is the username you have chosen for your GitHub account:
https://username.github.io/portfolio/software/index.html
or, simply:
https://username.github.io/portfolio/software
It may take a few minutes for your uploaded files to appear on GitHub.
Return to Contents.