css - Div. Combine precentage and fixed size -
Is this possible? Div "Menu" and "Submenu" should be 50px tall. "Top" and "bottom" should be 60% and 40%, for the "top", the previous-to-view-count will be 60% -50px.
& lt; Div id = "menu" & gt; & Lt; / Div & gt; & Lt; Div id = "top" & gt; & Lt; / Div & gt; & Lt; Div id = "submenu" & gt; & Lt; / Div & gt; & Lt; Div id = "down" & gt; & Lt; / Div & gt;CSS did not find units to say you 60% - 50px - this effect To achieve something like, you have to resort to javascript to calculate the sizes.
If your div is straight inside, then you do not have to apply too many layout engines again - on document load, get the viewport size, then calculate That's 60% -50px in pixels and assign #top element as height, and so on for #bottom.
Comments
Post a Comment