Back to July Calendar Previous Entry Next Entry→

July, 14, 2005

 

I tried to rebuild the look of the web site where I’m posting these logs so that it now has a more coherent calendar approach.  This rebuild involved the discovery of cascading style sheets (.css files)—the latest approach standardizing html. Cascading style sheet files allow the user to define the style for a collection of web pages.  This frees you from having to write lots and lots of html to set a bunch of individual attributes. At the World Wide Web Consortium (the group more or less responsible for defining how the web should be built) CCS site, you can find lots of good information on this.

 

For instance, the current styles.css file for the calendar pages I’m using to organize these sabbatical logs contains the following code:

 

body          { font-family: Verdana, Arial, Helvetica, sans-serif }

 

a             { text-decoration: none; color:#FF0C0D }

 

.month       { font-size: 12pt; text-align:center; background-color:#003399;     color:#EFF5FF }

 

.dayNames     { font-size: 8pt; text-align:center; font-weight:bold; background-color:#C9DBFF; color:#003399 }

 

.dayNumbers   { font-size: 8pt; text-align:right; background-color:#EFF5FF; color:#003399 }

 

.dayText      { font-size: 8pt; text-align:left; vertical-align:top; }

 

.otherMonth   { font-size: 8pt; text-align:right; background-color:#FFFFFF; color:#000000 }

 

So that in the html file you have code like

  <link rel="stylesheet" type="text/css" href="styles.css">
identifying which style sheet to use and then <tr class="month"> or
<tr class="dayname">  to indicate which style type to use in a particular area.

I think this is how it works…it does seem to work—but I will likely need to come back to the W3C site some time and nail this stuff down better.

 

This caused me all sorts of trouble because somehow Frontpage abruptly wanted the subdirectory sablog to be its own site…denying me access to the container site…or whatever you would call that.  After much trouble copying, pasting and then trying delete old things that couldn't be deleted...it seems to be ok again and the style sheet is working!