I have a site with a very active background (I'm talking 6 or so different z-indexes here 2 with animations). I wanted a in the foreground that had content but wanted a "window" through to the background in it. Some problems I had:
you can't "punch a hole" in a background, so...
- I built a containing div, lets call it "srminfo"
- Inside that I had a "top", "left", "window", "right" and "bottom"
- the top, left, right, bottom all had opaque white backgrounds
- while the srminfo and window divs had background:none;
No matter how hard I tried, the "right" div wouldn't fill the space between the "top" and "bottom" divs, I tried a lot of different things. The reason it had to be dynamic is that the text in the "left" div was dynamic based on the background colour, which was itself generated randomly with JavaScript.
How is display: table; and all the other related CSS code like tables? And how can it be used?
position: relative
works on "cells" as it works in Chrome, IE and others which is great when you've complex layouts :) Information about HTML tables (just remove things like colspan which are only for HTML tables and add needed CSS asdisplay: something
) on CSS-Tricks: css-tricks.com/fixing-tables-long-strings or css-tricks.com/complete-guide-table-element – Contraildisplay: table
. – Bunch