I have to build almost standard 3 columns layout
-----header-----
-s1-content-s2--
-----footer-----
Where sidebar1 and 2 has width:25%
and content box has 50%. And it working perfect.
But the difference is in sidebar1. On some subpages there is absolutely no content for it. I set css for sidebar1 to max-width:25%;
and when no content appears div has 0px x 0px. So almost done.
The final effect is to stretch content div to 75% when sidebar1 is empty.
Is it possible to do this without ugly css hacks or using JS? I checked many solutions and most are not working correctly.
This handles optional content on the left or right.
jsFiddle
HTML
CSS