In this web site, http://www.emblematiq.com, the layout is fluid/liquid. I was looking at the code but can not seem to figure out how it is achieved. Looks like a fixed width layout with the canvas element having a width of 1180px.
Can’t seem to find
- Any media queries in the CSS.
- Widths are set with px and not %.
- The JavaScript/jQuery involved does not seem to to be related to it.
I am sure I am missing something obvious but for the life of me can’t find the responsible code for it.
This page uses two systems to achieve “fluid liquid layout” :
Javascript
In
main.jswe can see :The smartresize event is brought by the jQuery smartresize plugin, used to get throttled resize events (to avoid overloading the JS engine).
This function enables and disables UI elements depending on the window width, and adapts the title height using a custom function making heavy use of jQuery.
CSS
mediaselectorsIn
main.csswe can see, for example :These rules set different properties according to the element width.
See w3.org/TR/css3-mediaqueries/