I have a layout of 3 columns. I need left and right divs width to be fixed in pixel and middle div should be extending based on the browser width.
Reference image
Grey and red divs width is fixed in pixels so that those two should be always right and left to the browser and green div shouldn't have any width because it should extend based on the browser width.
Here is the demo which i tried so far http://jsfiddle.net/JvHZ7/
You can use CSS tables. Here's a demo: little link. The basic outline would look like this, HTML:
CSS:
Try this jquery,
Here the Demo: fiddle
I hope this may helpful to you.
You can check this : http://jsfiddle.net/SHnc9/1/
This technique is known as negative column and it's used if you need to support IE7 and below.
Consider this HTML:
and CSS
This method is cross browser, doesn't require any hack and doesn't need JavaScript.
display: table; is not compatible in IE 7;
If you want to use jquery, do the following.
also note that height:100%; will not work to fix the height with the surrounding divs.