Results 1 to 3 of 3

Thread: Changing the font size in a table?

  1. #1

    Thread Starter
    Hyperactive Member Al Smith's Avatar
    Join Date
    May 1999
    Location
    Marcellus, MI. USA
    Posts
    330
    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.

  2. #2
    Guest
    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>

  3. #3
    Guest
    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
  •  



Click Here to Expand Forum to Full Width