?
Solved

how do you set the font size in a table cell?

Posted on 2005-05-05
5
Medium Priority
?
672 Views
Last Modified: 2013-12-03
I'm trying to set a table cell to a font size of smaller, or small, etc.

I know for setting the font style or name I would go

Dim tCell as table cell

tCell.Font.name = "arial"

how can I do the same for size???
0
Comment
Question by:shuittny
  • 2
  • 2
5 Comments
 
LVL 18

Expert Comment

by:tusharashah
ID: 13939750
tCell.Font.Size = 123

0
 

Author Comment

by:shuittny
ID: 13939823
i get a 'Integer can't be converted to 'System.Web.UI.WebControls.FontUnit' error message.

0
 
LVL 18

Accepted Solution

by:
tusharashah earned 500 total points
ID: 13939835
In that case use this:

tCell.Font.Size = FontUnit.Point(8)

0
 

Author Comment

by:shuittny
ID: 13940140
right on!

A-W-E-S-O-M-E!
0
 

Expert Comment

by:stevewolf
ID: 14899634
Very useful.  The Wrox book Professional ASP.NET shows an example (in VB.NET) as:

tCell.Style("font-family") = "Tahoma"
tCell.Style("font-weight")="30px"

which did not work.

tCell.font.whatever is exactly what I needed.

Thanks.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question