Print Page | Close Window

Change Font Size in display

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=2927
Printed Date: 29 March 2026 at 10:14am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Change Font Size in display
Posted By: phorne
Subject: Change Font Size in display
Date Posted: 21 May 2003 at 8:13pm

I need to change the font and size of a database list and can't get the code to work! I need the title to be smaller - HELP!! Have tried to put the <FONT FACE="Arial" SIZE="-2">Title</FONT> statement int he Response.write format but I must be doing something wrong..

'Loop through the recordset
Do While not rsevent.EOF
 
 'Write the HTML to display the current record in the recordset
 Response.Write (rsevent("number"))
 Response.Write (". ")
 Response.Write (rsevent("title")) 
 Response.Write ("</FONT>") 
 Response.Write ("<br> ")

 'Move to the next record in the recordset
 rsevent.MoveNext


Loop




Replies:
Posted By: farrukh
Date Posted: 22 May 2003 at 1:00am

<font size=-2> will not help in decreasing the size of the text. Do use <font size=1 color="green" face="verdana">
and then the asp coding
<%

%>
and close the </font>



-------------
i have collected some nice avatars (37) and smileys (227) here you can download
http://www24.brinkster.com/webmastertool/download.html


Posted By: aero
Date Posted: 22 May 2003 at 4:22am

OR try

<font face="Arial" style="font-size: 11px;" color="red">
<%
U'r ASP CODING
%>
</FONT>

Changes the FONT-SIZE PX to the size U want !!!!!!

 



Posted By: aero
Date Posted: 22 May 2003 at 4:27am

If U use LOOP then try this !!!!

'Loop through the recordset
Do While not rsevent.EOF
 
 'Write the HTML to display the current record in the recordset
 Response.Write ("<font face="arial" style="font-size'")
 Response.Write (rsevent("number"))
 Response.Write (';" color=2red">)
 Response.Write (rsevent("title")) 
 Response.Write ("</FONT>") 
 Response.Write ("<br> ")

 'Move to the next record in the recordset
 rsevent.MoveNext


Loop



Posted By: aero
Date Posted: 22 May 2003 at 4:27am

Response.Write (';" color=2red">) = Response.Write (';" color="red">)

sorry



Posted By: aero
Date Posted: 22 May 2003 at 4:30am

'Loop through the recordset
Do While not rsevent.EOF
 
 'Write the HTML to display the current record in the recordset
 Response.Write ("<font face="arial" style="font-size:'")
 Response.Write (rsevent("number"))
 Response.Write ("'px;" color="red">'")
 Response.Write (rsevent("title")) 
 Response.Write ("'</font>") 
 Response.Write ("<br> ")

 'Move to the next record in the recordset
 rsevent.MoveNext


Loop



Posted By: Scotty32
Date Posted: 22 May 2003 at 4:48am

thats not goin to work is it?

dont you have to have double Quotes?

like...

'Loop through the recordset
Do While not rsevent.EOF
 
 'Write the HTML to display the current record in the recordset
 Response.Write ("<font face=""arial"" style=""font-size:'")
 Response.Write (rsevent("number"))
 Response.Write ("'px;"" color=""red"">'")
 Response.Write (rsevent("title")) 
 Response.Write ("'</font>") 
 Response.Write ("<br> ")

 'Move to the next record in the recordset
 rsevent.MoveNext


Loop



Posted By: phorne
Date Posted: 22 May 2003 at 5:02am

The last post by Scotty_32 sorta works! It picks up the color but not the font size and also puts the results in single quotes - '1 Armagadon' (Also the number in the script is a field I display!")

Getting close - you guys are great! This is the code as I have it now - if I can get the single quotes gone and the size to work I'll be done!

 

'Loop through the recordset
Do While not rsevent.EOF
 
 'Write the HTML to display the current record in the recordset
 Response.Write ("<font face=""arial"" style=""font-size:'")
 Response.Write (rsevent("number"))
 Response.Write ("'8px;"" color=""red"">'")
 Response.Write (rsevent("title")) 
 Response.Write ("'</font>") 
 Response.Write ("<br> ")

 'Move to the next record in the recordset
 rsevent.MoveNext


Loop



Posted By: Scotty32
Date Posted: 22 May 2003 at 5:05am

sorry didnt see them

'Loop through the recordset
Do While not rsevent.EOF
 
 'Write the HTML to display the current record in the recordset
 Response.Write ("<font face=""arial"" style=""font-size:")
 Response.Write (rsevent("number"))
 Response.Write ("8px;"" color=""red"">'")
 Response.Write (rsevent("title")) 
 Response.Write ("'</font>") 
 Response.Write ("<br> ")

 'Move to the next record in the recordset
 rsevent.MoveNext


Loop

 

better?



Posted By: phorne
Date Posted: 22 May 2003 at 5:09am

GOT IT FIXED - THANKS GUYS!

Final code that works:

'Loop through the recordset
Do While not rsevent.EOF
 
 'Write the HTML to display the current record in the recordset

 Response.Write ("<font face=""arial"" style=""font-size:14'")
 Response.Write ("'px;"" color=""black"">")
 Response.Write (rsevent("number"))
   Response.Write (". ")
 Response.Write (rsevent("title"))
 Response.Write ("</font>")
 Response.Write ("<br> ")
  
 
 'Move to the next record in the recordset
 rsevent.MoveNext


Loop



Posted By: Scotty32
Date Posted: 22 May 2003 at 5:13am

i was wondering....

wouldnt this just be alot easyer?

 Response.Write ("<font face=""arial"" style=""font-size:14px;"" color=""black"">" & rsevent("number") & ". " & rsevent("title") & "</font><br>")

 



Posted By: aero
Date Posted: 22 May 2003 at 5:26am

Yes me to !??? whay do u have

Response.Write (rsevent("number"))
if ud are writing the number in
Response.Write ("<font face=""arial"" style=""font-size:14'")

is the Response.Write (rsevent("number")) not the number u want u'r font-size to be !????




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net