将DIV的大小设置为适合内容所需的大小 [英] size a DIV as large as needed to fit contents
本文介绍了将DIV的大小设置为适合内容所需的大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个DIV,其内容根据数据大小不同。我怎样才能确定DIV的大小以适应它的内容?
解决方案
好的,我正在服用进入阻止发件人的风险列表。
如果您使用表格,您可以将您想要的内容放入div
到td。您可以格式化td本身而不是div,或者您可以将div放入
,宽度和高度= 100%的td。 td将根据
数据调整其大小。
如果您不再需要与表相关的建议,请在您的
消息请不要表格。
Eliyahu
" JezB" < JE *********** @ blueyonder.co.uk>在消息中写道
news:ub ************* @ tk2msftngp13.phx.gbl ...我有一个DIV的内容根据数据大小不一。我怎样才能准确地将DIV的大小调整到适合它的内容?
你的意思是什么?
你唯一可以真正做到的设计是wize ....是允许完全扩展
来扩展窗口。
OR构成宽度并让长度流动
" JezB" < JE *********** @ blueyonder.co.uk>在消息中写道
news:ub ************* @ tk2msftngp13.phx.gbl ...我有一个DIV的内容根据数据大小不一。我怎样才能确定DIV的大小以适应它的内容?
非常欢迎任何建议 - 谢谢。
" Eliyahu Goldin" <再************* @ monarchmed.com>在消息中写道
新闻:%2 **************** @ TK2MSFTNGP10.phx.gbl ...好的,我冒着进入阻止发件人的风险列表。
如果您使用表格,您可以将您想要的内容放入div
中。您可以格式化td本身而不是div,或者您可以将div
放入td,宽度和高度= 100%。 td将根据数据b $ b调整其大小。
如果您不再需要与表相关的建议,请在您的
消息中添加注释请不要表格 ;。
Eliyahu
JezB < JE *********** @ blueyonder.co.uk>在消息中写道
新闻:ub ************* @tk2msftngp13.phx.gbl ...我有一个DIV,其内容大小不一数据。我怎么能
大小DIV正好适合它的内容?
>
I have a DIV whose contents varies in size according to data. How can I size
the DIV precisely to fit it''s contents ?
解决方案
Ok, I am taking a risk of getting into your "Block sender" list.
If you use a table, you can put the content you want to be inside the div
into a td. You can format td itself instead of div or you can put a div into
the td with width and height=100%. The td will adjust its size according to
data.
If you don''t want table-related suggestions anymore, put a note in your
messages "no tables please".
Eliyahu
"JezB" <je***********@blueyonder.co.uk> wrote in message
news:ub*************@tk2msftngp13.phx.gbl...I have a DIV whose contents varies in size according to data. How can I size the DIV precisely to fit it''s contents ?
what do you mean ?
the only thing you can really do design wize.... is to allow full expansion
to scale with the window.
OR constict the wide and let the length flow
"JezB" <je***********@blueyonder.co.uk> wrote in message
news:ub*************@tk2msftngp13.phx.gbl...I have a DIV whose contents varies in size according to data. How can I size the DIV precisely to fit it''s contents ?
Any suggestions are very welcome - thanks.
"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...Ok, I am taking a risk of getting into your "Block sender" list.
If you use a table, you can put the content you want to be inside the div
into a td. You can format td itself instead of div or you can put a div into the td with width and height=100%. The td will adjust its size according to data.
If you don''t want table-related suggestions anymore, put a note in your
messages "no tables please".
Eliyahu
"JezB" <je***********@blueyonder.co.uk> wrote in message
news:ub*************@tk2msftngp13.phx.gbl...I have a DIV whose contents varies in size according to data. How can I
sizethe DIV precisely to fit it''s contents ?
这篇关于将DIV的大小设置为适合内容所需的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文