How can control table TH's width

J

Jack

Hello,
<TABLE BORDER=1 CELLSPACING=0>
<TR>
<TH>
<style="WIDTH=10">
ABC
</TH>
<TH>
<style="WIDTH=500">
DEF
</TH>
</TR>
</TABLE>

But ABC and DEF's width is same.I want control TH's width
Thank you
 
J

Jack

It's myself
How can specify TH's length by pixel or centimeter in that table?
I wait anyone's help
 
E

Evertjan.

Jack wrote on 26 jan 2004 in microsoft.public.inetserver.asp.general:
It's myself
How can specify TH's length by pixel or centimeter in that table?
I wait anyone's help

Not an ASP (serverside) issue

PLEASE go elsewhere to a HTML group
 
C

Chris Barber

True, however, a good understanding of basic HTML first would be useful,
then moving to the application of CSS. In my opinion CSS is better applied
as a stylesheet as opposed to explicit style attributes.

eg. <TH class="width-small">Test</TH>

and in the stylesheet:

TABLE TR TH.width-small {width: 10px;}

My point was that the basic level of understanding of where and what to look
for when confronted with something like this seemed to be lacking, hence the
post into the NG for what is generally very easy to find using Google and a
good book references.

Chris.

Or how about looking into CSS properly..

<th style="width:10px">
ABC
</th>

or

<th style="width:60%">

etc...

http://www.w3schools.com/css/

Chris
 
C

CJM

It's OK Chris... wasnt having a go at you... lol

Chris Barber said:
True, however, a good understanding of basic HTML first would be useful,
then moving to the application of CSS.

Yep, agreed.

In my opinion CSS is better applied
as a stylesheet as opposed to explicit style attributes.

eg. <TH class="width-small">Test</TH>

and in the stylesheet:

TABLE TR TH.width-small {width: 10px;}

Yeah, much like my thoughts too.

I just didnt want to go into the nth level of detail, when really we were
only
trying to edge the OP to some guides/references, but I always use external
CSS files.

Spoiler: I think the 'width-small' class name should be changed to something
describes the semantics rather than the styling. That is, next week the OP
might
change the styling to green text rather than a narrow column. Even something
simple like 'FirstCol' would do. Yes, I know I'm being pedantic... lol
My point was that the basic level of understanding of where and what to look
for when confronted with something like this seemed to be lacking, hence the
post into the NG for what is generally very easy to find using Google and a
good book references.

Very true... there is plenty of bad advice out there, but I guess if you
stick to the
higher-ranked google and NG recommendations you cant go wrong.

Cheers

Chris

PS. It's probably worth pointing out that if you can get to them, there are
two
non-MS NG's for these kind of enquiries:

comp.infosystems.www.authoring.html
comp.infosystems.www.authoring.stylesheets

[Warning: not quite as mellow as this NG!]
 

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

Forum statistics

Threads
474,143
Messages
2,570,822
Members
47,368
Latest member
michaelsmithh

Latest Threads

Top