1 reply [Last post]
Yohon55
Offline
newbie
Last seen: 12 years 23 weeks ago
Joined: 2006-12-14
Posts: 1
Points: 0

I am using this code for font color and sizes

td.id { border:1pt solid #000000; text-align: center; vertical-align: center; padding: 2px; width: 55px; color: #FFFFFF; font-family: Arial; font-weight: bold; font-size: 24pt; background-color:#000000} I am using this code for numbers. what happens(not very often) when The numbers get past 3 digits. It ruins the flow of the program. The numbers get to big for its space.

For example we use numbers like these 100.14.

My question is....is there any way if the Numbers is greater than 3 digits. The fonts size can change to a smller font.

mod edit/<code> tags added/tph

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 4 years 32 weeks ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

When the numbers get higher

When the numbers get higher than 100, give the table cell an additional class which reduces the font size, e.g.:

99 100

td.id {
border:1pt solid #000000;
text-align: center;
vertical-align: center;
padding: 2px;
width: 55px;
color: #FFFFFF;
font-family: Arial;
font-weight: bold;
font-size: 24pt;
background-color:#000000
}
td.id.small {
font-size: 14pt;
}

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference