Font size depend on table height

M

Martin Johansen

Hello group

Is there a way, using html and css, to have font be scaled after the
height of the hosting table/div cell.

Thanks.
 
J

Jukka K. Korpela

Is there a way, using html and css, to have font be scaled after the
height of the hosting table/div cell.

No.

If you analyze (and maybe tell us, illustrating the issue with a URL)
_why_ you would like to do so, you might end up with a solvable problem.
It sounds very strange to want to make the font scale by the table height
(which is impossible) and not vice versa (which is more than solvable -
it happens if you _don't_ do anything to prevent it).
 
S

Sid Ismail

On 20 Sep 2004 10:54:17 -0700, (e-mail address removed) (Martin Johansen) wrote:

: Hello group
:
: Is there a way, using html and css, to have font be scaled after the
: height of the hosting table/div cell.


The cell-size changes if you increase the font-size... cannot do it other
way round.

Sid
 
S

SpaceGirl

Sid said:
On 20 Sep 2004 10:54:17 -0700, (e-mail address removed) (Martin Johansen) wrote:

: Hello group
:
: Is there a way, using html and css, to have font be scaled after the
: height of the hosting table/div cell.


The cell-size changes if you increase the font-size... cannot do it other
way round.

Sid

<devils advocate>

I think that might not be strictly true >:) While it might be stupid to
try it you COULD... hmm if you know the height of the table in pix
(which you could work out in JS), and you know the number of rows, you
could write a lump of script to increase the size of your text via CSS
properties :)

</devils advocate>

--


x theSpaceGirl (miranda)

# lead designer @ http://www.dhnewmedia.com #
# remove NO SPAM to email, or use form on website #
 
M

Martin Joh

Jukka K. Korpela said:
No.

If you analyze (and maybe tell us, illustrating the issue with a URL)
_why_ you would like to do so, you might end up with a solvable problem.

The practical problem is this. I am trying to avoid the use of pictures in
order to fit all formating and data into a single html file, which are btw
automatically generated by another program. One of the problems is scalable
brackets around content depending of the contents of the hosting table, like
the example below. Note that the contents may be another table with a lot of
contents etc.

<table>
<tr>
<td>(</td><td>contents</td><td>)</td>
</tr>
 
J

Jukka K. Korpela

Martin Joh said:
The practical problem is this. I am trying to avoid the use of
pictures in order to fit all formating and data into a single html
file, which are btw automatically generated by another program.

You are only describing a wrong attempt at attacking some unspecified
problem, not the original problem itself, and you didn't post a URL.

How do pictures come into the picture, and how is the single HTML file
idea involved? You are just listing unrelated concepts.
One
of the problems is scalable brackets
Brackets?

around content depending of the
contents of the hosting table, like the example below. Note that the
contents may be another table with a lot of contents etc.

<table>
<tr>
<td>(</td><td>contents</td><td>)</td>
</tr>
</table>

Don't try to scale parentheses, or brackets for that matter. Setting the
size would be just one of the unsolvable problems.

Why should the contents appear between some huge parentheses? Having no
idea of what the page really contains, I can just suggest that you should
probably use some borders around a block. With the given snippet, there
is no reason to assume that you need a table at all. You could simply put
the contents inside a block (<p>, <div>, whatever) and suggest left and
right borders for it in CSS. Or if you really want to use just HTML for
that, you could do so too, using the less widely known attributes of
<table> (basically <table frame="vsides" border="3">, for a single-
cell table, for some value of "3").
 
S

Sid Ismail

On Tue, 21 Sep 2004 14:30:14 +0100, SpaceGirl

: Sid Ismail wrote:
: > On 20 Sep 2004 10:54:17 -0700, (e-mail address removed) (Martin Johansen) wrote:
: >
: > : Hello group
: > :
: > : Is there a way, using html and css, to have font be scaled after the
: > : height of the hosting table/div cell.
: >
: >
: > The cell-size changes if you increase the font-size... cannot do it other
: > way round.
: >
: > Sid
: >
:
: <devils advocate>
:
: I think that might not be strictly true >:) While it might be stupid to
: try it you COULD... hmm if you know the height of the table in pix
: (which you could work out in JS), and you know the number of rows, you
: could write a lump of script to increase the size of your text via CSS
: properties :)
:
: </devils advocate>


Original poster said ".. using html and css.."

?? JS ??

Sid
 
M

Martin Johansen

SpaceGirl said:
<devils advocate>

I think that might not be strictly true >:) While it might be stupid to
try it you COULD... hmm if you know the height of the table in pix
(which you could work out in JS), and you know the number of rows, you
could write a lump of script to increase the size of your text via CSS
properties :)

</devils advocate>

--


x theSpaceGirl (miranda)

# lead designer @ http://www.dhnewmedia.com #
# remove NO SPAM to email, or use form on website #

Thanks Space Girl, thats a creative solution, skills like that are valued,
i'll go forth and research your algorithm.

And, as you understood, js is very much a part of the web domain of html and
css, though it is not strictly a part of it

Thanks again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top