css - Vertically centering faux-absolute-positioned (float: left) elements -


i'm trying display semitransparent grid of captioned images physically underneath "lightbox"/overlay actual content in it. font size in document set using vw units, height of overlay changes depending on screen resolution.

i want vertically center whichever happens smaller - background image grid, or overlay. if text in overlay bigger (font-size-wise), want grid vertically center relative overlay, if grid bigger want overlay vertically center relative grid.

initially tried using position: absolute on overlay of course failed epically when discovered text in said overlay overlap content below grid if font-size got big. i'm using faux absolute positioning (demo) has resolved overlap problem (the content pushed down whichever bigger, grid or lightbox, haven't been able combine neat trick of float-vertical-centering demos/examples i've found on , elsewhere.

the grid table (which took me quite while figure out!), switch other method (a long series of floats, example) if absolutely necessary. (the grid arguably tabular data, in opinion.)

this non-public document i'm sending i'm authoring using html5/css3 rich layout/styling/formatting, rules of "strict semantics" (okay, quite) relaxed in situation. (latex->pdf impossible - restarting xpdf reload pdf progressively drive me far wall i'd drill hole in ceiling head - , libreoffice choke on ~150+ images i'm dealing with. , besides, document full of progressively accrued css3 awesomeness have leave behind if switched pdf/odt...)


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -