Click here to Skip to main content
15,886,788 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I have a List call Category(height is 300px). There are already 5 Items on it.

So i need is, if i add another category item through backend, that new item should auto set to new height. (See the example to clear bit more)

Example : I have 5 category item. And List height is 300px. So this case each list item will set height as (300/5) 60px. If i add new category item then height should be set to (300/6) 50px.

how can i mange this?? Plz help me out. Thank in advance.
Posted
Comments
upendra shahi 20-Apr-15 5:53am    
Kindly use % in place of px....
Nisarg Desai 20-Apr-15 7:43am    
are you adding in it with JavaScript or any Server Side Scripting?

1 solution

CSS
/*to prefent collapsed height list items*/
min-height : 300px;
/*to make height dynamic*/
height : auto;
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900