0

Please take a look of this example
There is a div (dashed) which has three div (red, black & blue) inside of it. If i re-size dashed div, all three div re-size automatically but when i re size the red color div it only re-sizes but i want to fit into the container when i re-size the red div and vice-verse.

is there anyway to re-size any element along with change the siblings size in ratio?

Bibhaw
  • 487
  • 3
  • 13
  • 26

2 Answers2

1

U can use alsoresize

Have a look here Code

kritya
  • 3,312
  • 7
  • 43
  • 60
  • but i have such requirement where i need to set the size of parent ( container ) – Bibhaw Aug 11 '11 at 07:46
  • thanks kritya. yes it works let me put this code in my webApp but i am afraid whether it'll work or not. Actually i need to develop such coding which works like jsFiddle. Anyway you gave me an idea to do somehow. thanks again – Bibhaw Aug 11 '11 at 08:21
  • 1
    Well this will certainly work :D Unless u put it like u have here – kritya Aug 11 '11 at 08:23
0

one way of achievng this is at the time of writing the css codes u can put the height and width using the percentages like

height:70%;
width:80%;

so now when ull resize all the internals will get resized too

Parv Sharma
  • 12,581
  • 4
  • 48
  • 80