I am trying to add two divs inside the parent div, which has a button inside each div.
I need to fix the width in pixels only for the second div and the 1st div should be having width in % so that the button inside the 1st div should be covering the entire space of the browser.
I need all the widths in % and also I don’t want to change either html structure and css because it is already implemented so i just need changes in css property.
Here is my demo
http://jsfiddle.net/zuyyT/2/
P.S : When I scale the browser, the second div is coming in next line. Please scale it and check once.
Fiddle is working on and off … you can go either one of two ways; using floats (need to change the order of your markup) or positioning – like such …
and your CSS …
… using position, you’ll need to add
position:relativeto .block and thenright:0to .block_right; keep the margin on .block_leftUsing positioning, you won’t need to change the order of the elements in your markup (should that be an issue).