使用严格HTML帮助表 [英] Help with a table using Strict HTML

查看:50
本文介绍了使用严格HTML帮助表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我继承了一个需要严格HTML的简单页面,而且我不是很熟悉这个标准的b $ b。我正在努力做什么_应该很漂亮

简单所以我希望有人可以指出我正确的方向。


我正在努力制作一个有2列的桌子拆分中间 - 简单

就够了。在过去,如果没有严格的HTML,我只需将每个单元格的宽度指定为
为50%,但在< td>中不允许宽度。在严格的HTML下。

有时我会将这两个单元格制作成45%,单元格之间的单元格为10%。

使间距更具可读性。如果我只删除''width''属性'',

,浏览器将根据每个

单元格中的内容不同地分割屏幕宽度。不幸的是,我需要匹配一个表格拆分的格式

中间。


是否有一种简单的方法来控制列的宽度我的桌子什么时候

使用严格的HTML?


非常感谢,BT

解决方案

" BT" < no@xnono.com>写道:

我正在尝试制作一个分为中间的2列的表 - 简单
就够了。在过去,如果没有严格的HTML,我只会将每个单元格的宽度指定为50%,但是在< td>中不允许宽度。在严格的HTML下。


< col width =" 50%">或者td {宽度:50%;}


如果您不确定如何应用上面的

,请查看HTML和CSS规范。 />

有时我会将这两个单元格设为45%,其间有10%的单元格


使间距更具可读性。




不要使用空单元格,使用合适的CSS。

是否有一种简单的方法可以控制表格中列的宽度当
使用严格的HTML ??




见上文,但这些实际上是数据表还是你只是使用

表创建布局列?


史蒂夫


-

我的理论给你了,我的异端愤怒你,

我从不回信,你也不喜欢我的领带。 - 医生


Steve Pugh< st *** @ pugh.net> < http://steve.pugh.net/>




" BT" < no@xnono.com>在消息中写道

news:q%****************** @ tornado.texas.rr.com ...

我继承了一个需要严格HTML的简单页面,我对这个标准并不是很熟悉。我想做的事情_应该很简单,所以我希望有人可以指出我正确的方向。

我正在努力制作一张分为2列的表格中间 - 简单够了。在过去,如果没有严格的HTML,我只会将每个单元格的宽度指定为50%,但是在< td>中不允许宽度。在严格的HTML下。有时我会将这两个单元格制作成45%,单元格之间的单元格为10%,以使间距更具可读性。如果我只删除''width''
属性'',浏览器会根据每个单元格中的内容分割不同的屏幕宽度。不幸的是,我需要匹配一个格式,其中
表格在中间分割。

是否有一种简单的方法来控制表格中列的宽度
使用时严格HTML?

非常感谢,BT



不太了解严格标准,但有时我会在单元格上方的1个像素高的透明.gifs上方放置一行

或以下。然后相应地设置.gifs的

宽度。正如您在.gifs中指定的那样,使所有列高于或低于

。当你切片图像时,Adobe的Image Ready会做同样的事情



你的桌面边框会设置为0吗?如果是这样,你甚至不会看到

..gifs的行。


Carla


2005年3月30日星期三18:30:37 GMT,c.thornquist< c。********** @ insightbb.com>

写道:

" BT" < no@xnono.com>在消息中写道
新闻:q%****************** @ tornado.texas.rr.com ...

使用严格的HTML时,是否有一种简单的方法可以控制表格中列的宽度?


对严格不太了解标准,但有时我在
或以下放置一行,在单元格中有1像素高的透明.gifs。然后相应地设置.gifs的
宽度。使这些.gifs中指定的所有列完全高于或低于
。当你切片图像时,Adobe的Image Ready会做同样的事情。




如何将spacer.gif作为表格数据?如果你认为在布局表中滥用

spacer gifs对你的目的是好的,请继续使用它们,

但是指出其他人在那条可怕的错误道路上并不受欢迎。


OP应该只是读取w3c规范中的表格。在那里他会发现在

html严格使用元素colgroup和col可以很好地控制列

宽度,如果需要由作者设置的话。在几乎所有情况下,表格数据

将根据需要收缩或拉伸表格列宽,因此

设置作者宽度没有用。

-

, - - < - @ - PretLetters:''woest wyf'',遇见vele interesses:----------。

|博客| http://home.wanadoo.nl/b。 de.zoete / _private / weblog.html |

| webontwerp | http://home.wanadoo.nl/b。 de.zoete / html / webontwerp.html |

| zweefvliegen | http://home.wanadoo.nl/b。 de.zoete / html / vliegen.html |

` --------------------------- ----------------------- - < - @ ------------''


I inherited a simple page that needs to be Strict HTML and I''m not very
familiar with this standard. What I''m trying to do _should be_ pretty
simple so I hope someone can point me in the right direction.

I''m trying to make a table with 2 columns split down the middle - simple
enough. In the past, without Strict HTML, I would just specify the width of
each ''cell'' as 50%, but width isn''t allowed in a <td> under Strict HTML.
Sometimes I would make these 2 cells 45% with a 10% cell between them to
make the spacing more readable. If I just remove the ''width'' attribute'',
the browser splits the screen width differently depending on what''s in each
cell. Unfortunately, I need to match a format where the table is split down
the middle.

Is there a simple way to control the width of the columns in my tables when
using strict HTML??

many thanks, BT

解决方案

"BT" <no@xnono.com> wrote:

I''m trying to make a table with 2 columns split down the middle - simple
enough. In the past, without Strict HTML, I would just specify the width of
each ''cell'' as 50%, but width isn''t allowed in a <td> under Strict HTML.
<col width="50%"> or td {width: 50%;}

Check the HTML and CSS specs if you''re not sure how to apply the
above.

Sometimes I would make these 2 cells 45% with a 10% cell between them to


make the spacing more readable.



Don''t use empty cells, use appropriate CSS.
Is there a simple way to control the width of the columns in my tables when
using strict HTML??



See above, but are these actually tables of data or are you just using
tables to create layout columns?

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/>



"BT" <no@xnono.com> wrote in message
news:q%******************@tornado.texas.rr.com...

I inherited a simple page that needs to be Strict HTML and I''m not very
familiar with this standard. What I''m trying to do _should be_ pretty
simple so I hope someone can point me in the right direction.

I''m trying to make a table with 2 columns split down the middle - simple
enough. In the past, without Strict HTML, I would just specify the width
of each ''cell'' as 50%, but width isn''t allowed in a <td> under Strict
HTML. Sometimes I would make these 2 cells 45% with a 10% cell between
them to make the spacing more readable. If I just remove the ''width''
attribute'', the browser splits the screen width differently depending on
what''s in each cell. Unfortunately, I need to match a format where the
table is split down the middle.

Is there a simple way to control the width of the columns in my tables
when using strict HTML??

many thanks, BT


Don''t know much about "strict" standards, but sometimes I place a row above
or below with transparent .gifs 1 pixel high in the cells. Then set the
width of the .gifs accordingly. Makes all the columns above or below exactly
as you specified in those .gifs. Adobe''s Image Ready does then same thing
when you slice an image.
Will your table borders be set to "0"? If so, you won''t even see the row of
..gifs.

Carla


On Wed, 30 Mar 2005 18:30:37 GMT, c.thornquist <c.**********@insightbb.com>
wrote:

"BT" <no@xnono.com> wrote in message
news:q%******************@tornado.texas.rr.com...

Is there a simple way to control the width of the columns in my tables
when using strict HTML??


Don''t know much about "strict" standards, but sometimes I place a row above
or below with transparent .gifs 1 pixel high in the cells. Then set the
width of the .gifs accordingly. Makes all the columns above or below exactly
as you specified in those .gifs. Adobe''s Image Ready does then same thing
when you slice an image.



How on earth is a spacer.gif ever going to be tabular data? If you think abusing
spacer gifs in layout tables is fine for your purposes, please keep using them,
but pointing others down that horrible faulty road is not much appreciated.

OP should really just read on tables in the w3c specs. There he''ll find that in
html strict using the elements colgroup and col give good control over column
width, if it needs to be set by author. In almost all situations tabular data
will shrink or stretch a table columns width as needed, so there is no use for
setting the width by author.
--
,-- --<--@ -- PretLetters: ''woest wyf'', met vele interesses: ----------.
| weblog | http://home.wanadoo.nl/b.de.zoete/_private/weblog.html |
| webontwerp | http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html |
|zweefvliegen | http://home.wanadoo.nl/b.de.zoete/html/vliegen.html |
`-------------------------------------------------- --<--@ ------------''


这篇关于使用严格HTML帮助表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆