Reputation:
I designed a webpage using bootstrap to make it responsive. when I check the result on my PC everything looks fine, but when I uploaded it on server the grid system has probems. when I open it on mobile, instead of loading col-xs-* it loads col-sm-* .its funny when I inspect the page by chrome, in the chrome top nav bar i see the width is 600px, but it is loading sm instead of xs.
to give more details:
I seriously dont know whats happening!
the main iframe code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>main</title>
<script src="js/jquery-2.2.0.min.js"></script>
<link rel="stylesheet" href="css/bootstrap.min.css">
<script src="js/bootstrap.min.js"></script>
</head>
<body style="background-color: gray">
<iframe src="login.html" frameborder="0" id="theMainIFrame" style="width: 100vw; height: 100vh; position: fixed; left: 0; top: 0; right: 0; bottom:0"></iframe>
</body>
</html>
one of the parts having problem :
<div class="container-fluid">
<div class="row" style="text-align: center">
<div class="col-xs-12 col-xs-push-0 col-sm-12 col-sm-push-0 col-md-6 col-md-push-3 col-lg-4 col-lg-push-4" style="background-color: #bababa">
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#Login">Login</a></li>
<li><a data-toggle="tab" href="#Register">Register</a></li>
</ul>
</div>
</div>
</div>
I would be grateful if anyone could help me.
Upvotes: 1
Views: 376
Reputation:
I found the solution ... surprisingly just adding the following code to my iframe container page solved everything.
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
Upvotes: 1