Attribute 'nowrap' is considered outdated. A newer construct is recommended. What is it?

后端 未结 4 1622
独厮守ぢ
独厮守ぢ 2020-12-29 02:03

I\'m getting an error when compiling this within an ASPX page using Visual Studio 2010:

    

4条回答
  •  [愿得一人]
    2020-12-29 02:29

    You can use it like this, I hope you wont get outdated message now.

      
    

    As pointed by @ThiefMaster it is recommended to put width and valign to CSS (note: CSS calls it vertical-align).

    1)

    
    

    2) We can make a CSS class like this, it is more elegant way

    In style section

    .td-some-name
    {
      white-space:nowrap;
      width:237px;
      vertical-align:top;
    }
    

    In HTML section

    
    

提交回复
热议问题