I'm trying to convert my site to use some more CSS styles, and I've already created a replacement for some recurring font tags.
Now I'm trying to convert some of the tables to CSS styles.
For example, I've got this table opening;
<table align=""center"" cellspacing=""1"" cellpadding=""1"" border=""0"" bgcolor=""" & strTableBorderColor & """ width=""10%"">
How would I convert this to this:
<table class=""ts01"">
(ts01 = table style 01)
I've tried it with this:
".ts01{text-align: center; spacing: 1; padding: 1; border: none; background: " & strTableBorderColor & "}" & vbNewline & _
but that gives me strange results (the padding/spacing seems more than it should be.
By the way, the total table I'm trying to CSS is a sort of 'default' table used in my sidebar.
It's allways constructed like this:
Response.Write "<table align=""center"" cellspacing=""1"" cellpadding=""1"" border=""0"" bgcolor=""" & strTableBorderColor & """ width=""10%"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strCategoryCellColor & """ height=""" & strCategoryCellHeight & """>" & vbNewLine & _
" <font class=""fft0""><b> " & strSidebarDelimiter & strAdText & strSidebarDelimiter & "</b></font></td>" & vbNewLine & _
" </tr><td cellspacing=""0"" bgcolor=""" & strForumCellColor & """ align=""center"" valign=""middle"">" & vbNewLine & _
" <table align=""center"" cellspacing=""0"" cellpadding=""0"" border=""0"" bgcolor=""" & strForumCellColor & """ width=""10%"">" & vbNewLine & _
" <tr height=""2"">" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ align=""center"" valign=""middle"" height=""2"">"
%>
<!--#INCLUDE file="inc_adsense.asp" -->
<%
Response.Write "</td></td></table></tr></table>"
In green the first surrounding table, in brown the second inner table.