How to position contents according to zoom level?


Tags: html,css,css3

Problem :

I see this website:

http://www.uppbroadgatepark.com/

I like it. When I zoom in the navigation adjusts, and if I zoomed to >200% a new button called 'Menu' appears, which groups all the navigation links together when clicked.

I want to know how is this possible? Is it pure CSS or JS included? I tried using percentages for scaling but it does not position as cleanly as the website mentioned.



Solution :

You should use Cross Browser Zoom and Pixel Ratio Detector

Code

$(window).resize(function(){
   var zoom = detectZoom.zoom();
   var device = detectZoom.device();
   alert("zoom: "+zoom +" , device:" +device);
});

DEMO


    CSS Howto..

    How to downsize a larger image while showing only one portion of it in CSS (or adding JS to the mix if necessary)?

    How to change the focus state in CSS to just affect the keyboard and not mouse clicks

    How to make text wrap when resizing in a inline div, without the div moving onto a new line first?

    How to make a better transition of

    How to avoid overlapping text using CSS?

    How to get the div block to be centered in a modal window

    How to create
    with special form in CSS or Javascript

    How to load CSS into CodeIgniter

    How to create an animated rainbow line using CSS or Javascript?

    How to do a “true” carbon fiber CSS background

    How to make an element not trigger scrollbars?

    How to make a header bar fold over the webpage css

    CSS: How to load a css file for all browsers except IE?

    How to use CSS sprites within a responsive design

    How to create 3d ribbon box in css

    How to draw half-opened line in CSS? [closed]

    Any ideas how to display divs vertically in bootstrap container?

    How to find the css, color codes and other coding a site uses

    How to make a CSS transform affect the flow of other elements

    How to morph multi-part css properties with Mootools Fx?

    How to write css fallbacks for vh vw

    How to change the display property in a css class using js when user clicks a button

    How to tooltip keep active using HTML and CSS or Jquery?

    How to override default styles in GWT 2.3?

    How to use a defined property value as another property in pure CSS?

    how to change the color of disabled controls

    Position:Absolute; Div is making the page too wide and adding blank space to the side. How do I reduce its size?

    How to build the whole web site from css design [closed]

    How to Use jquery Animate() with .slideToggle() Between Two Classes

    How to make the page load scrolled down to
    when loaded?