I am attempting to compile a list of products with a concealed div inside. Upon clicking on the product, the hidden div should reveal and display details.
If you inspect the fiddle, you'll notice that the final hidden div protrudes beyond the margins when activated.
Using jQuery to unveil the hidden div:
function activateDropdown(entry_id) {
$(".box-dropdown").hide("slow");
$("#box-dropdown-" + entry_id).show("slow");
}
Is there a technique to "align" it while adhering to the margins? (Given that the site is responsive, the number of green divs might decrease to 3 or even 2 as the viewport size decreases...)
Recent Developments:
-
The opened hidden square should have dimensions of 4x4 and be positioned above the other three divs. View updated fiddle.
-
The hidden div should expand from left-to-right, but in the case of the last square, it ought to enlarge right-to-left.