Click here to Skip to main content
15,910,358 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I try building the demo html code as shown below.

HTML
<!DOCTYPE html>
<html lang="">
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title>Title Page</title>

		<!-- Bootstrap CSS -->
		<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">

		<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
		<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
		<!--[if lt IE 9]>
			<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.2/html5shiv.min.js"></script>
			<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
		<![endif]-->
	</head>
	<body>
		<h1 class="text-center">Hello World</h1>

		<!-- jQuery -->
		<script src="//code.jquery.com/jquery.js"></script>
		<!-- Bootstrap JavaScript -->
		<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
		<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
 		<script src="Hello World"></script>
 		<div class="container">
 			Lorem ipsum dolor sit amet, consectetur adipisicing elit. A aspernatur possimus dolor fuga sapiente, iusto accusantium sed, beatae incidunt doloremque facilis in perspiciatis neque iure libero assumenda sequi ea obcaecati.
 		</div>
	</body>
</html>



C#
It's showed with real width: 1170px. https://gyazo.com/0e13b41b6c619b8efb7a26e2e1b87922

But, when I try adding into view (_Layout.cshtml) in ASP.NET MVC project. Container's width looks like smaller than 1170px. https://gyazo.com/9fe838a4a0ed22f47eb0a96986747e83

Thanks for helping (bow)


What I have tried:

I tried to add below css but It didn't work for me.

.container-full {
margin: 0 auto;
width: 100%;
}
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900