html - How to position two divs side by side where the second width is 100%? -


i want achieve this:

width=60px         width = remaining space |------|    |-----------------------------------| | div1 |    | loren ipsun...                    | |------|    |                                   |             |                            div2   |             |-----------------------------------| 

sample html on jsfiddle.

is possible place 2 divs side-by-side leaving second div remaining space?

just float first div, , set margin-left of second div accommodate width of first div. this:

div.one {   width: 60px;   float: left; }  div.two {   margin-left: 60px; } 

keep in mind width css property on div applies content, need set margin-left sum of width, border, margin, , padding properties of first div.

here updated version of jsfiddle. let me know if have questions it.


Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -