ASP Classic Styles

## Web Building

HOME Web Empty Site Web Database

## PHP Demo

PHP Demo PHP Website PHP Styles PHP Database PHP Navigation PHP Ajax

## ASP Demo

ASP Demo ASP Website ASP Styles ASP Database ASP Login ASP Security ASP Navigation ASP Ajax

## .NET Web Pages

WebPages Demo WebPages Website WebPages Styles WebPages Database WebPages Login WebPages Security WebPages Navigation WebPages Ajax

## .NET Web Forms

WebForms Demo WebForms Website WebForms Styles WebForms Database WebForms Navigation WebForms Ajax

## Web Building

Web Design Web Quality Web WAI Web Validation Web SEO Web TCP/IP

## Web Hosting

Host Intro Host Providers Host Domains Host Capacity Host Email Host Technologies Host Databases Host Types Host E-commerce

# ASP Classic - Adding Style

« Previous
Next Chapter »

Learn ASP Classic by building a web site from scratch.

Part II: Adding CSS and a Standard Layout.

## What We Will Do

In this chapter we will:

- Create a standard style sheet for the site

## Create a Style Sheet

In your web folder (DemoASP), create a new CSS file named "Site.css".

Put the following code inside the CSS file:

## Site.css

body
{
font: "Trebuchet MS", Verdana, sans-serif;
background-color: #5c87b2;
color: #696969;
}
#main
{
padding: 30px;
background-color: #ffffff;
border-radius: 0 0 4px 4px;
}
h1
{
font: Georgia, serif;
border-bottom: 3px solid #cc9900;
color: #996600;
}

The CSS file above defines the styles to be used used for

- The HTML body element <body>
- The HTML element with id="main"
- The HTML heading element <h1>

## Create an Include File

In your web folder (DemoASP), create a new file named "Footer.inc".

Put the following code inside the file:

## Footer.inc

<p>&copy; <%=DatePart("yyyy",now())%> W3Schools. All rights reserved.</p>

## Edit the Home Page

In your "DemoASP" folder, edit the file named "Default.asp".

Change the content to the following:

## Default.asp

<!DOCTYPE html>
<html>
<head>
<title>ASP Demo</title>
<link href="Site.css" rel="stylesheet">
</head>
<body>
<div id="main"
<h1>Welcome to W3Schools</h1>
<h2>Web Site Main Ingredients</h2>
<p>A Home Page (Default.asp)</p>
<p>A Style Sheet (Site.css)</p>
<p>Include files (Header.inc, Footer.inc)</p>
<!-- #include="Footer.inc" -->
</div>
</body>
</html>
Run example »

The home page above, is a copy of the home page from the previous chapter, with an added link to a style sheet (marked red), and an included footer.

## Congratulations

You have created your first ASP Classic site, with a main page (Default.asp), a common footer for all your pages (Footer.inc), and a common style sheet (Site.css).

In the next chapters of this tutorial, we will add a database to the web site. And finally we will add navigation.

« Previous
Next Chapter »

## Your suggestion:

Your E-mail (optional):

Page address:

Description:

Close [X]

## Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

## WEB HOSTING

Best Web Hosting UK Reseller Hosting Wow! $5 SSD Hosting

## WEB BUILDING

Download XML Editor
FREE Website BUILDER FREE Website Creator

## WEB RESOURCES

Web Statistics Web Validation

## SHARE THIS PAGE