|
-
May 27th, 2000, 09:26 AM
#1
Thread Starter
Hyperactive Member
Hi,
I can't seem to find the way to change the font size in an ASP generated table.
Is it in a seperate Font tag or in the Table tag or ???
Thanks,
Al.
A computer is a tool, not a toy.
-
May 27th, 2000, 11:32 PM
#2
You can do it a couple of different ways(whatever tool they[vBulletin] use to parse through the tags keeps inserting their own properties in some of the tags; because of this the example of using font tags has to extra properties that should be removed, the hardcoded values for font face and size):
Code:
<% Option Explicit %>
<html>
<style type="text/css">
td.title {font-family:verdana;font-size:12pt;font-weight:bold;}
td.row {font-family:verdana;font-size:10pt;}
</style>
<body bgcolor="#FFFFFF>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<FONT FACE="verdana" size="3">
<b>Using Font Tags</b>
</font>
</td>
</tr>
<%
Dim i
Dim intFontSize, strFontFace
intFontSize = 2
strFontFace = "Verdana"
For i = 1 to 20
%> <tr>
<td>
<FONT SIZE="2" FACE="arial, helvetica" face="<%= strFontFace %>" size="<%= intFontSize %>">
<%= "MyRecordsetRow " & i %>
</font>
</td>
</tr>
<%
Next
%>
</table>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="title">
Using Style Sheets
</td>
</tr>
<%
For i = 1 to 20
%>
<tr>
<td class="row">
<%= "MyRecordsetRow " & i %>
</td>
</tr>
<%
Next
%>
</table>
</body>
</html>
-
May 28th, 2000, 12:14 AM
#3
Roughly translated you must put <FONT> tags in every table cell you want change the font of.
Code:
<table>
<tr>
<td>
<FONT SIZE="2" FACE="arial, helvetica" size="4">Text</font>
</td>
<td>
<FONT SIZE="2" FACE="arial, helvetica" size="-1">Text</font>
</rd>
</tr>
</table>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|