0

I just added scalability to my website, but when I scale, the navigation scales too. on all devices, (specifically mobile), when the page is zoomed in, the nav zooms as well. How do I keep the nav the same size regardless of the viewport zoom?

I tried referring to this question, but can't make out the explanation for it. If this is what I'm looking for, can someone please help explain it a little more?

I created this JSFiddle, but being that it's mobile, I'm not sure if it'll be helpful.

Nav:

<nav>
<div>
<a href="/">
    <div id="logo"><img src="http://www.lehigh.edu/google/google_search.png" alt="Home"/></div>
    <div id="headtag"><img src="http://codeboxr.com/wp-content/uploads/2012/06/6_logo_predesign.jpg" alt="Home"/></div>
    <div id="tagline"><img src="https://www.google.com/logos/doodles/2014/world-cup-2014-2-4845213826678784.3-hp.gif" alt="Home"/></div>
</a>
</div>
<div> 
<a href="/" class="here">Home</a>
<a href="/about.php">About</a>      
<a href="/services.php">Services</a>
<a href="/pricing.php">Pricing</a>
<a href="/contact.php">Contact Us</a>
<!--input id="srchbar" type="search" placeholder="Search"-->
</div>
</nav>

https://jsfiddle.net/foeLo3xx/ 1) not zoomed enter image description here

2) Zoomed in on mobile (IPhone 5s) enter image description here

dbf
  • 6,399
  • 2
  • 38
  • 65
blackRob4953
  • 1,585
  • 2
  • 12
  • 15

1 Answers1

0

Unfortunately, there is no good/reliable way of achieving what you want.

One crude way would be to detect the change in zoom level of and then dynamically resize you navbar container to the current screen width. However, achieving this is not trivial. Another answer on how to detect screen size here explains the difficulty.

Community
  • 1
  • 1
Pranjal
  • 796
  • 1
  • 8
  • 24
  • ok, how do I go about the code for that? I'm assuming javascript is needed , I'm new with that and not familiar with it – blackRob4953 Sep 08 '15 at 17:44