extjs - Move an element to next line using CSS, if it doesn't fit in the available area width -


i have view created using extjs, composed of autocompleting textbox (bound store) , custom templated dataview (again, bound store). , view looks below.

enter image description here

here's how works.

  • user searches tag in searchbox, , selects matching tag dropdown. once selected, automatically added dataview right below, appears tag cloud (though not exactly).
  • tag item added dataview custom styled, , has "remove" link next label remove dataview.

now, here's problem:

  • the available width of dataview fixed, if tag item text longer, can see gets broken , remaining part of tag appears on next line.

what want this:

enter image description here

as can see if tag item not small enough fit available area, gets next line, if space available, on same line.

any way attain css? or need write js logic this?

note css solution, i'm bound support evil ie7/8.

yes can similar in css, have sample code can post online somewhere? can give advice on actual code?

but achieve this, each input field needs have css style of

display: inline-block; 

so if fits in provided width, remain in same line, if text box large, goto next line.

looking @ example, seems have kind div container "overflow: hidden". in senario, either remove overflow: hidden or can wrap input text boxes div , set width there.

edit

here's example

http://jsfiddle.net/raver0124/7x2h3/


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -