Custom dynamic_sidebar Function to Generate Class Definitions Corresponding to a Widget’s Position

In wordpress, if 2 widgets are stacked horizontally, there is no straightforward way of setting the width of the left widget as x and that of the right widget as y through php/css. The only way to accomplish that is by using hardcoded class definitions in the css. I have jotted down an easy solution for this problem in the wordpress ideas forum. However the code that I pasted looks all gibberish because most of the HTML tags in the code are not allowed. Hence this post for anybody who wants to see the code and other details. Continue reading