nowrap

Elements with nowrap get stuck to adjacent elements in WebKit

…衆ロ難τιáo~ 提交于 2019-12-23 21:34:00
问题 I have a ul list that I display as a horizontal menu. I'd like the content of each li to remain on one line, but the entire li items to jump lines as necessary. Something like: First entry in the menu Second menu entry These words are short, the LI jumps lines, but doesn't wrap Yet anoter] [And more] [Some more] Logically, I'd just put li {white-space:nowrap;} , but there is a problem with WebKit browsers. Items with nowrap get stuck to adjacent items. So in the case above, all the li will be

2 TextViews, left with ellipsis, right with nowrap, single line

一个人想着一个人 提交于 2019-12-23 18:29:02
问题 It's the first time I post on this forum, hope it's gonna be fine :) I'm developping an Android App for public transportation in my city. Here is what I have [ |short destination ||next departure| ] [ |way too long dest...||next departure| ] Here is what I want: [ |short destination||next departure| ] [ |way too long dest...||next departure| ] Here is a more complete example: s28.postimg.org/5gejnvfd9/actual2.png Weird coloured backgrounds are just here to easily identify layouts/textviews.

CSS nowrap for other than text elements?

扶醉桌前 提交于 2019-12-22 01:25:25
问题 Is there a way to avoid wrapping of a div 's content when the content is not just text e.g. several buttons? 回答1: white-space:nowrap; should do the trick. #foo { white-space:nowrap; width: 100px; } <div id="foo"> <input type="button" value="hello"/> <input type="button" value="hello"/> <input type="button" value="hello"/> <input type="button" value="hello"/> <input type="button" value="hello"/> <input type="button" value="hello"/> <input type="button" value="hello"/> </div> Demo 回答2: You can

css white-space:nowrap horizontal scroll bug

心已入冬 提交于 2019-12-19 02:54:08
问题 I have the following markup <style type="text/css"> #outer { min-height: 100%; height: auto !important; height: 100%; width:100%; white-space:nowrap; } #inner { background-color:#CCCCCC; margin:0px 4px 0px 4px; padding:5px 5px 0px 5px; border:1px solid #9A9A9A; border-width:1px 1px 0px 1px; } </style> <div id="outer"> <div id="inner"> TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST </div> </div> When the browser is wide enough, it looks like

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

柔情痞子 提交于 2019-12-18 11:38:09
问题 I'm getting an error when compiling this within an ASPX page using Visual Studio 2010: <td valign="top" nowrap width="237"> The error message is "Attribute 'nowrap' is considered outdated. A newer construct is recommended." What construct is the error message referring to? And does it behave exactly the same as 'nowrap'? 回答1: You can use it like this, I hope you wont get outdated message now. <td valign="top" style="white-space:nowrap" width="237"> As pointed by @ThiefMaster it is recommended

Prevent line break in this case

☆樱花仙子☆ 提交于 2019-12-13 20:40:25
问题 I am trying to prevent line breaking in this Html http://jsfiddle.net/DD3v8/ It happens that when I resize my window, both icons and text break into new line. I've already tried with whitespace CSS property. I've tried also, a table approach, but the behaviour is the same Can anyone figure what is happening? Thanks in advance 回答1: try this: .line { height: 44px; width: 100%; display: inline-block; background-color: #6c7987; white-space: nowrap; position: relative; } .icon { position: absolute

Link arrows dropping to new line

大兔子大兔子 提交于 2019-12-13 01:33:47
问题 I have a sidebar with a list of links and each link has an arrow icon to the right of it (set in the anchor styles using the :after selector). On many of the links, the arrow is dropping down to its own line. I want to make sure the text can break to a new line as needed, but prevent the arrow from being orphaned onto a line by itself. I thought I had solved the problem by using "white-space: nowrap" on the :after pseudo element because that worked in Firefox. Unfortunately, I discovered it

How to avoid text wrapping in a td with text and a right-floated label

北城余情 提交于 2019-12-09 06:09:31
问题 http://jsfiddle.net/a2kvU/ <table class="table table-bordered table-condensed"> <tbody> <tr><td class="nowrap">abc def ghi jkl<span class="label label-info pull-right">123</span></td><td>XYZ</td><td>XYZ</td><td>XYZ</td><td>XYZ</td><td>XYZ</td><td>XYZ</td></tr> <tr><td class="nowrap">abc def ghi<span class="label label-info pull-right">456</span></td><td>XYZ</td><td>XYZ</td><td>XYZ</td><td>XYZ</td><td>XYZ</td><td>XYZ</td></tr> <tr><td class="nowrap">abc def<span class="label label-info pull

页面布局之flex布局

删除回忆录丶 提交于 2019-12-08 02:37:25
flex布局 flex布局 也叫作 弹性盒子布局 ,可以简便、完整、响应式的实现各种页面布局,同时也支持所有的浏览器。父级元素设置css样式为:display:flex。内容的位置用justify-content来控制,常用的属性有: space-between 、 space-around 、 center 、 left 、 right 。(注释:类名为father的盒子中写了4个类名为son的盒子) 一共有6个属性是添加给父级的,分别有: flex-direction 、 flex-wrap 、 flex-flow 、 justify-content 、 align-items 、 align-content 。 flex-direction 用来决定主轴的方向,默认值为row,所以默认横向排列。row|row-reserve|column|column-reserve。 flex-wrap 来决定换行,nowrap不能换行;wrap换行,多余的自动在左下方;wrap-reserve换行,多余的自动在左上方,默认值为nowrap。 flex-flow 是flex-direction和flex-wrap的简写,默认值为row nowrap。 .father { width: 500px; height: 150px; display: flex; justify-content