`

the issue about width of container be marked up and word separate by wrap

阅读更多
there is a hell about html css
I want to indicate a fixed container, but the width of container always be mark up by text. such as span, td.
now, let's study this issue particularly.

code a segment of HTML as below

<html>
<head>
    <style type="text/css">
table {border-collapse: collapse; width: 94px; table-layout: fixed;}
td { width: 30px; padding: 0; margin: 0; overflow: hidden; }
    </style>
</head>
<body>
	<table border="1">
        <tr>
			<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td>
		</tr>
	</table>
	<br />
    <table border="1">
        <tr>
            <td>word</td>
            <td><span style="white-space: nowrap ">two words</span></td>
            <td><span style="white-space: normal ">onereallylongword</span></td>

        </tr>
    </table>
</body>
</html>


and analyse the property: table-layout, white-space, word-wrap,
I take my analyse result to image


continue study to other element. I found that the width will be make up by content as below element even if you indicate the width value to px or %:
span, table(without table-layout:fixed)

and the element as below can wrap my content exact:
p, div

the compare effect as image




  • 大小: 41.7 KB
  • 大小: 32.7 KB
分享到:
评论

相关推荐

    The Lancaster Corpus of Mandarin Chinese

    The Lancaster Corpus of Mandarin Chinese (LCMC) is designed as a Chinese match for the FLOB and FROWN corpora for modern British and American English. The corpus is suitable for use in both ...

    MySQL error code 145 Table was marked as crashed and should be repaired

    在处理MySQL数据库时遇到错误代码145(`Table was marked as crashed and should be repaired`)是一个常见的问题,尤其是在表结构遭到损坏或数据库服务突然中断的情况下。根据提供的部分日志内容可以看出,该错误...

    Java邮件开发Fundamentals of the JavaMail API

    advantage of users having multiple folders on the server and these folders can be shared by multiple users. Due to the more advanced capabilities, you might think IMAP would be used by everyone. It...

    Google C++ Style Guide(Google C++编程规范)高清PDF

    More complex inline functions may also be put in a .h file for the convenience of the implementer and callers, though if this makes the .h file too unwieldy you can instead put that code in a separate...

    Probability: For the Enthusiastic Beginner

    It will appeal to the reader who has a healthy level of enthusiasm for understanding how and why the various results of probability come about.All of the standard introductory topics in probability ...

    2009 达内Unix学习笔记

    集合了 所有的 Unix命令大全 ...telnet 192.168.0.23 自己帐号 sd08077-you0 ftp工具 192.168.0.202 tools-toolss ... 各个 shell 可互相切换 ksh:$ sh:$ csh:guangzhou% bash:bash-3.00$ ... 命令和参数之间必需用空格隔...

    polycom宝利通视频会议软件3.9 2018

    by accepting these terms or by installing, downloading, copying, or otherwise using the SOFTWARE PRODUCT, you agree to be and will be bound by the terms of this Agreement as a condition of your ...

    The Reasoned Schemer, 2nd Edition

    As in the first edition, the pedagogical method is a series of questions and answers, which proceed with the characteristic humor that marked The Little Schemer and The Seasoned Schemer. Familiarity ...

    Dundas.Chart.for.Winform.Enterprise.v7.1.0.1812.for.VS2008

    These charts ignore the passage of time but can be used illustrate the forces of supply and demand on a security. Point and Figure Chart Type (Enterprise Edition only) - Point and Figure Chart uses ...

    数位板压力测试

    Applications interact with the interface by setting up tablet contexts and consuming event packets. Applications may assume interface and hardware control functions by be¬coming tablet managers. The...

    Struts2上传所需jar包

    and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or ...

    struts1.3.9.zip

    and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or ...

    Turbo C++ 3.0[DISK]

    - Note: The list of files is contained in a separate file called FILELIST.DOC, which will appear in the target directory you specify during installation. - After your initial installation, you ...

    The Reasoned Schemer

    The extension encapsulates most of the ideas in the logic programming language Prolog.The pedagogical method of The Reasoned Schemer is a series of questions and answers, which proceed with the ...

    Turbo C++ 3.00[DISK]

    - Note: The list of files is contained in a separate file called FILELIST.DOC, which will appear in the target directory you specify during installation. - After your initial installation, you ...

    Introduction to Risk Parity and Budgeting

    Although portfolio management didn't change much during the 40 years after the seminal works of Markowitz and Sharpe, the development of risk budgeting techniques marked an important milestone in the ...

    Enumerative Combinatorics, Volume 1(2nd)

    edition more up to date and to impart a wide variety of additional applications and examples. The main difference between this edition and the first is the addition of ten new sections (six in Chapter...

    cuteEditor6.0

    非常好的适应性: A semantically marked up document can be easily adapted to print and alternative browsing devices, like handheld computers and cellular phones, just by linking to a different ...

Global site tag (gtag.js) - Google Analytics