css3 - CSS set width of first element based on width of second element -
i'm not sure how work i'm trying accomplish bear me...
i'm trying set width of element, based on width of proceeding element. visually this:
container element -------------------------------------------- | | | | | | |<--auto width div1-->|<--div2 200px-->| | | | | | | --------------------------------------------
so, essentially, div2 set float on right of page, , div1 should span right edge of div2 automatically
i've started fiddle at: http://jsfiddle.net/yuvjs/
any appreciated... in advance...
just use tables. rid of float
, set 2 box divs display:table-cell
, container div display:table
. first box should adjust width automatically based on width of second box.
Comments
Post a Comment