CSS中的CSS字长 [英] CSS word long within the div

查看:90
本文介绍了CSS中的CSS字长的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下代码的缺陷:

与Mozilla,Netscape,单词hellooo .....从div退出;

与IE 5,5, 6 hellooo这个词....增加div的宽度,即使

如果我已经固定为100px的宽度;


问题:

我可以这样生成单词hellooooo .....仍然在div内吗?

我不想使用溢出来查看带滑动条的文本,

但它必须增加div的高度,所以div可以包含

所有单词hellooo .....

更多行;

我试图把heigth = auto但它不会改变null;


< div style =''width:200px;背景:绿色;''>


< div style =''width:100px;背景:#99CCFF;''>


helloooooooooooooooooooooooooooooooooooooooooooooo ooooooooooooooooooo

< / div>


< div style =''width:100px;背景:银色;''>

by

< / div>

< / div>

谢谢

Defects of the code below:
with Mozilla, Netscape, the word hellooo..... exit outside from the div;
with IE 5,5, 6 the word hellooo.... increase the width of the div, even
if i have fixed to 100px the width;

Question:
can I make so that word hellooooo..... remains all within to the div?
I do not want to use overflow in order to see the text with the sliding bar,
but it must to increase the height of the div, so the div can to contain
all the word hellooo.....
on more rows;
I have tried to put heigth=auto but it does not change null;

<div style=''width:200px;background:green;''>

<div style=''width:100px; background:#99CCFF;''>

helloooooooooooooooooooooooooooooooooooooooooooooo ooooooooooooooooooo
</div>

<div style=''width:100px; background:silver;''>
by by
</div>
</div>
thank you

推荐答案

provaands< in ********** @ tucossa.it>写道:
provaands <in**********@tucossa.it> wrote:
以下代码的缺陷:
与Mozilla,Netscape,单词hellooo .....从div退出;
与IE 5 ,5,6这个词hellooo ....增加div的宽度,即使
如果我已经固定到100px的宽度;

问题:
我可以这么做那个单词hellooooo .....仍然在div内部?
我不想使用溢出来查看带滑动条的文本,
但它必须增加高度div,所以div可以包含
所有单词hellooo .....
更多行;
我试图把heigth = auto但它不会改变null;

< div style =''width:200px; background:green;''>

< div style =''width:100px;背景:#99CCFF;>

hellooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooo
< / DIV>

< DIV风格=宽:100像素;背景:银色;''>
by
< / div>
< / div>
Defects of the code below:
with Mozilla, Netscape, the word hellooo..... exit outside from the div;
with IE 5,5, 6 the word hellooo.... increase the width of the div, even
if i have fixed to 100px the width;

Question:
can I make so that word hellooooo..... remains all within to the div?
I do not want to use overflow in order to see the text with the sliding bar,
but it must to increase the height of the div, so the div can to contain
all the word hellooo.....
on more rows;
I have tried to put heigth=auto but it does not change null;

<div style=''width:200px;background:green;''>

<div style=''width:100px; background:#99CCFF;''>

hellooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooo
</div>

<div style=''width:100px; background:silver;''>
by by
</div>
</div>




为什么你使用块级元素吗?

你为什么要设置宽度?


一个url,里面有你想用的实际样本内容

会更有用。


-

Spartanicus



Why are you using a block level element?
Why do you want to set a width?

An url with a sample of what you are trying to do using real content
would be much more useful.

--
Spartanicus


Spartanicus写道:
Spartanicus wrote:
provaands< in ********** @ tucossa.it>写道:

provaands <in**********@tucossa.it> wrote:

以下代码的缺陷:
与Mozilla,Netscape,单词hellooo .....从div退出;
用IE 5,5,6这个词hellooo ....增加div的宽度,即使
如果我已经固定到100px的宽度;

问题:
我可以这么说,hellooooo .....仍然在div内吗?
我不想使用溢出来查看带滑动条的文本,
但它必须增加div的高度,所以div可以包含所有单词hellooo .....
更多行;
我试图把heigth = auto但它不会改变null;

< div style =''width:200px; background:green;''>

< div style =''width:100px;背景:#99CCFF;>

helloooooooooooooooooooooooooooooooooooooooooooo ooooooooooooooooooooo
< / DIV>

< DIV风格=宽:100像素;背景:银色;''>
by
< / div>
< / div>
Defects of the code below:
with Mozilla, Netscape, the word hellooo..... exit outside from the div;
with IE 5,5, 6 the word hellooo.... increase the width of the div, even
if i have fixed to 100px the width;

Question:
can I make so that word hellooooo..... remains all within to the div?
I do not want to use overflow in order to see the text with the sliding bar,
but it must to increase the height of the div, so the div can to contain
all the word hellooo.....
on more rows;
I have tried to put heigth=auto but it does not change null;

<div style=''width:200px;background:green;''>

<div style=''width:100px; background:#99CCFF;''>

helloooooooooooooooooooooooooooooooooooooooooooo ooooooooooooooooooooo
</div>

<div style=''width:100px; background:silver;''>
by by
</div>
</div>



你为什么用块等级元素?
因为这是一个布局的一部分比较复杂;

代码固有的只有一部分布局完成(这不是
重要的解决方案问题)你为什么要设置宽度?
因为布局的左栏是这样的(柱子宽度不可变)带有使用真实内容尝试做的样本的网址将更有用。


Why are you using a block level element? Because this is a portion of a layout more complex;
the code inherent only one portion of the layout complete (that isn''t
important for resolve the problem) Why do you want to set a width? Becuse the left column of layout is so (colum with width non variable) An url with a sample of what you are trying to do using real content
would be much more useful.



我在localhost上测试过;

但问题很简单:

如果我想用那个代码用那个文字就可以解析

问题?



I tested on localhost;
but the question is simple:
if I would like used that code with that text is it possible resolve the
problem ?



provaands< in ********** @ tucossa.it>写道:
provaands <in**********@tucossa.it> wrote:
为什么使用块级元素?


因为这是布局的一部分更复杂;
代码固有的只有布局的一部分完成(这对于解决问题并不重要)

Because this is a portion of a layout more complex;
the code inherent only one portion of the layout complete (that isn''t
important for resolve the problem)




你赢了''让我们看看问题,你认为你已经描述过了,但是你所做的只是提出了一个解决方案。那不是你想要它做的事情。


一个正确的答案需要真正的内容:
http://www.spartanicus.utvinternet.i...s_help_you.htm

-

Spartanicus



You won''t let us see the "problem", you think that you''ve described it,
but all you''ve done is present a "solution" that doesn''t do what you
want it to do.

A proper answer requires real content:
http://www.spartanicus.utvinternet.i...s_help_you.htm

--
Spartanicus


这篇关于CSS中的CSS字长的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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