473,394 Members | 1,658 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

What is the default height of a cell if unspecified?

If I have something like,

<TABLE><TR><TD STYLE="'Font-Family:Arial'">Arial
Text</TD></TR></TABLE>

What would be the height of the cell? I believe it would be
corresponding to the font used... But how do I know?? Are there any
documents on this? any help would be appreciated..

Regards,
Rithish.
Jul 20 '05 #1
11 13740
ri*****@dacafe.com (Rithish) wrote:
If I have something like,

<TABLE><TR><TD STYLE="'Font-Family:Arial'">Arial
Text</TD></TR></TABLE>
What's with the extra quotes around your style rule?
What would be the height of the cell? I believe it would be
corresponding to the font used... But how do I know??
In this case the height of the cell would be the height of the line
box containing the words Arial Text (assuming it all fits on one
line). This is normally something roughly around 1.2 * font-size.
The top and bottom padding of the table cell would then go above and
below that before the table cell borders.
Are there any
documents on this? any help would be appreciated..


http://www.w3.org/TR/CSS2/tables.html#height-layout

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #2
ri*****@dacafe.com (Rithish) wrote in message news:<fd*************************@posting.google.c om>...
<TABLE><TR><TD STYLE="'Font-Family:Arial'">
Invalid CSS. You have weird quoting. (Also, single cell tables, inline
style, and font-family without a generic alternative are all generally
bad ideas).
What would be the height of the cell?
It will be as high as it needs to be.
I believe it would be
corresponding to the font used...


Yes. (If you mean height in CSS terms. Otherwise you have to accound
for the padding and borders).
Jul 20 '05 #3
the height of a table cell, unless specified, is usu. the height of
content inside it (..;) i.e., if table contains one line of text, height
is size (height) of font (for ex., if you specify a font-height of 10px,
height of cell will be 10px..) if you put two lines of text in a font
size of 10px height will be 20px, and so on..
also, if you put in an img inside the cell and nothing else height of
cell will be height of img.. (all this assuming you have not specifed
height of table in table tag.. which I believe has been deprecated
anyway..) hope this helps..

Frances Del Rio
Rithish wrote:
If I have something like,

<TABLE><TR><TD STYLE="'Font-Family:Arial'">Arial
Text</TD></TR></TABLE>

What would be the height of the cell? I believe it would be
corresponding to the font used... But how do I know?? Are there any
documents on this? any help would be appreciated..

Regards,
Rithish.


Jul 20 '05 #4
if you don't specify font-size then height will be whatever the font
height is (according to how it falls in user's browser, which can vary
wildly from browser to browser if you don't specify font size, which is
why I always specify font-sizes for everything, even though a lot of
people say you shouldn't do this.. but like this I get a better idea of
how exactly my stuff will look at the other end.. :)

Frances
Frances Del Rio wrote:
the height of a table cell, unless specified, is usu. the height of
content inside it (..;) i.e., if table contains one line of text, height
is size (height) of font (for ex., if you specify a font-height of 10px,
height of cell will be 10px..) if you put two lines of text in a font
size of 10px height will be 20px, and so on..
also, if you put in an img inside the cell and nothing else height of
cell will be height of img.. (all this assuming you have not specifed
height of table in table tag.. which I believe has been deprecated
anyway..) hope this helps..

Frances Del Rio
Rithish wrote:
If I have something like,

<TABLE><TR><TD STYLE="'Font-Family:Arial'">Arial
Text</TD></TR></TABLE>

What would be the height of the cell? I believe it would be
corresponding to the font used... But how do I know?? Are there any
documents on this? any help would be appreciated..

Regards,
Rithish.



Jul 20 '05 #5
Frances Del Rio <fd***@yahoo.com> wrote in news:2nv47qF537t0U1@uni-
berlin.de:
the height of a table cell, unless specified, is usu. the height of
content inside it (..;) i.e., if table contains one line of text, height is size (height) of font (for ex., if you specify a font-height of 10px,
height of cell will be 10px..) if you put two lines of text in a font
size of 10px height will be 20px, and so on..
also, if you put in an img inside the cell and nothing else height of
cell will be height of img.. (all this assuming you have not specifed
height of table in table tag.. which I believe has been deprecated
anyway..) hope this helps..


The height of a line of text is not based on font-size, well, not directly.
What matters most is the line-height property - line height is usually a
bit bigger, unless you explicitly say otherwise.

Egads! Lead your life away from sin by bottom-posting :-)

--
Anqdc>
Jul 20 '05 #6
Steve Pugh <st***@pugh.net> wrote in message news:<q6********************************@4ax.com>. ..
ri*****@dacafe.com (Rithish) wrote:
If I have something like,

<TABLE><TR><TD STYLE="'Font-Family:Arial'">Arial
Text</TD></TR></TABLE>
What's with the extra quotes around your style rule?


I apologize... My mistake..

In this case the height of the cell would be the height of the line
box containing the words Arial Text (assuming it all fits on one
line). This is normally something roughly around 1.2 * font-size.


So, would this be in the units in whatever units the font-size is specified in??
Regards,
Rithish.
Jul 20 '05 #7
ri*****@dacafe.com (Rithish) wrote:
Steve Pugh <st***@pugh.net> wrote:

In this case the height of the cell would be the height of the line
box containing the words Arial Text (assuming it all fits on one
line). This is normally something roughly around 1.2 * font-size.


So, would this be in the units in whatever units the font-size is specified in??


Sorry, your question isn't clear.

The line-height property can be specified either as a length using any
of the CSS length units, or as a multiplier of the font-size, or as a
percentage of the font-size, or as 'normal'.
http://www.w3.org/TR/CSS2/visudet.ht...ef-line-height

The height property of the cell can be specified as a length using any
of the CSS length units.

But you were asking about the default values not the values specified
in an author's CSS. The default value of line-height might be
specified in a browser's internal stylesheet in any of the ways
outlined above but the default value of the table cell's height will
need to be computed for each cell and thus won't be specified
anywhere.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #8
Steve Pugh <st***@pugh.net> wrote in message >
In this case the height of the cell would be the height of the line
box containing the words Arial Text (assuming it all fits on one
line). This is normally something roughly around 1.2 * font-size.


What if the cell would contain multiple lines of text? How is the
spacing determined?
Regards,
Rithish.
Jul 20 '05 #9
ri*****@dacafe.com (Rithish) wrote:
Steve Pugh <st***@pugh.net> wrote in message
In this case the height of the cell would be the height of the line
box containing the words Arial Text (assuming it all fits on one
line). This is normally something roughly around 1.2 * font-size.


What if the cell would contain multiple lines of text? How is the
spacing determined?


Each line of text would generate its own line box and so the height of
the cell would be the sum of the heights of each line box.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #10
Steve Pugh <st***@pugh.net> wrote in message news:<jc********************************@4ax.com>. ..
ri*****@dacafe.com (Rithish) wrote:
Steve Pugh <st***@pugh.net> wrote:

In this case the height of the cell would be the height of the line
box containing the words Arial Text (assuming it all fits on one
line). This is normally something roughly around 1.2 * font-size.


So, would this be in the units in whatever units the font-size is specified in??


Sorry, your question isn't clear.


I meant to ask whether the calculated value of the height of the cell
would be dependent on the font-size units. I believe, the resource
that you pointed to says just so.. Thanks.. doubt clarified.. :o)

Regards,
Rithish.
Jul 20 '05 #11
Steve Pugh <st***@pugh.net> wrote in message news:<jc********************************@4ax.com>. ..
ri*****@dacafe.com (Rithish) wrote:
Steve Pugh <st***@pugh.net> wrote:

In this case the height of the cell would be the height of the line
box containing the words Arial Text (assuming it all fits on one
line). This is normally something roughly around 1.2 * font-size.


So, would this be in the units in whatever units the font-size is specified in??


Sorry, your question isn't clear.


I wanted to confirm whether the thus calculated height of the line-box
would be dependent on font-size units. The resource that you pointed
to was helpful.. :o)
Thanks..

Regards,
Rithish.
Jul 20 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: kAldam | last post by:
I am currently using IE 6.0 and 5.5 and the scenario is the following. I have a span that contains text, and the span is beign contained by a table cell (this is the way thing need to be in my...
1
by: Wayne | last post by:
I'm using the following code from the Access Web to open a folder. The folder opens in "List" View. Is there an addition that I can make to the code to force the folder to open in "Details" view?...
1
by: john | last post by:
The Item and AlternatingItem properties of the grid have a height property. If you set the height bigger than the row's default height, it makes the row height bigger. But if you try to make the...
2
by: Tor Inge Rislaa | last post by:
How to change row height in a DataGrid I have DataGrid that is filled with data from a table in a DataSet. The content of the cells is text of more than one line (as a note field). What I...
2
by: todd.freed | last post by:
Hi All, I am using the <asp: Calendar> object. In the OnDayRender event handler I am putting text into certain day boxes, and leaving others blank. The effect is that some months have no...
7
by: Arthur Dent | last post by:
I am completely baffled... i cannot for the life of me get the HEIGHT style to work on a table in the new 2005-supported XHTML. I put a HEIGHT: 100% on my table so that my footer row will also show...
1
by: Mike Collins | last post by:
I am trying to create some pages and have them take 100% of the window, but I cannot get 100% to work. If I set the height of my div, the page displays a scroll bar and it looks like I set the...
7
by: Phlip | last post by:
HTMLers: Start with this simple HTML: <table border='1' width='100%' height='90%'> <tr><td> <div style='overflow: auto'> </div> </td></tr> </table>
5
by: BillE | last post by:
I am using VB.NET, VS 2005 Add a windows form and in design view: Add a Radiobutton to the windows form Set AutoSize = True for the radiobutton Set the MaximumSize width to 90 for the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.