...

View Full Version : Question about the class attribute



kaitco
12-08-2005, 05:52 AM
Hello. I am not a very savvy user of CSS, but I am attempting to learn.
I have just a simple question that perhaps someone can help me with:

I am using the class attribute to make a very simple header for a VERY simple page of my website, but I cannot get the class attribute to work properly. I am using Frontpage 2002 and each time I try to view my progress the class attribute has no affect on the desired text. I know that there are probably fancier and cleaner ways to accomplish this page, but I just want this one thing to work as I try to understand how CSS works. I have entered the code that I have written below and have bold-faced, that which I think presents the problem. Please, can anyone help me?


<DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Update Archives -- Dorienne Smith.com</title>
<style>
body {color: #ffffff; background-color: #000000; font-family: Verdana}
p.title {font-family: Arial; font-size: 24; font-style: bold; color: #ffffff;}
</style>
</head>

<body>
<p class="title"><center> Update Archives</center></p>
<p>12/8/2005 - Removed the polls...they were not very good anyway... </p>
<p>12/7/2005 - Updated and added new comics to Midnight Calvin </p>
<p>12/5/2005 - The Ranting has begun! Created the page and added rants to The Daily Rant </p>
<p>11/3/2005 - Added feature show The X-Files to the TV Department </p>
<p>10/29/2005 - Updated Fashion Reviews and updated Midnight Calvin</p>
<p>10/27/2005 - Added comics to Midnight Calvin</p>
<p>10/7/2005 - Updated What's Hot for Fall 2005</p>
<p>6/7/2005 - Updated What's Hot for Spring 2005</p>
<p>6/7/2005 - Ended the Animation Station...were you actually going to visit it?</p>
<p>6/6/2005 - Changed the style of the homepage, the me page, and other stuff...</p>
</body>

</html>

vinyl-junkie
12-08-2005, 06:01 AM
You're actually pretty close to what you need. I've bolded the changes I made to your code.


<DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Update Archives -- Dorienne Smith.com</title>
<style>
body {color: #ffffff; background-color: #000000; font-family: Verdana}
p.title {font-family: Arial; font-size: 24; font-style: bold; color: #ffffff; text-align: center;}
</style>
</head>

<body>
<p class="title">Update Archives</p>
<p>12/8/2005 - Removed the polls...they were not very good anyway... </p>
<p>12/7/2005 - Updated and added new comics to Midnight Calvin </p>
<p>12/5/2005 - The Ranting has begun! Created the page and added rants to The Daily Rant </p>
<p>11/3/2005 - Added feature show The X-Files to the TV Department </p>
<p>10/29/2005 - Updated Fashion Reviews and updated Midnight Calvin</p>
<p>10/27/2005 - Added comics to Midnight Calvin</p>
<p>10/7/2005 - Updated What's Hot for Fall 2005</p>
<p>6/7/2005 - Updated What's Hot for Spring 2005</p>
<p>6/7/2005 - Ended the Animation Station...were you actually going to visit it?</p>
<p>6/6/2005 - Changed the style of the homepage, the me page, and other stuff...</p>
</body>

</html>

_Aerospace_Eng_
12-08-2005, 06:09 AM
Your CSS syntax is still a bit wrong, it should look like this.

<style type="text/css">
body {color: #ffffff; background-color: #000000; font-family: Verdana, sans-serif}
p.title {font-family: Arial, sans-serif; font-size: 24px; font-weight: bold; color: #ffffff; text-align:center;}
</style>
An h1 or some other header tag would probably be best to use since you are using this for a title.

kaitco
12-08-2005, 06:16 AM
Yes! Thank you both! It actually works now and I think I am getting the hang of all of this.
Thanks so much!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum