bootstrap div css styling

I'm using Visual Studio 2013 and I am working on a ASP.NET MVC 4 application using the basic template and C# and razor syntax.

So i have a view that is made up of 3 partial views the top is the header, the body is another and the footer is the third partial view.

In the body partial view I have a div that looks like this and this is the main container div for anything in the body.

<div class="container">

</div>


in the bootstrap.css style sheet I have the following items:

.container {
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}

@media (min-width: 768px) {
  .container {
    width: 750px;
  }
}
@media (min-width: 992px) {
  .container {
    width: 970px;
  }
}
@media (min-width: 1200px) {
  .container {
    width: 1170px;
  }
}
.container-fluid {
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;

}

Open in new window


So when I run my page I get something that looks like this:
When I look at the div properties of my rendered page I see that the width of this div in the body is 1170px

my page showing the size of my div when i select inspect element in chrome web browser
If I reduce the browser window size horizontally(the width of my browser window with my mouse), then the width of my div seems to resize to 970px as shown here:

my page showing the size of my div when i select inspect element in chrome web browser
Then if I continue to reduce the width size of my web browser window then the width of my div seems to resize to 750px as shown here:

my page showing the size of my div when i select inspect element in chrome web browser

So from resizing my web browser window I see that my div resizes to those three width sizes shown above that are declared in the bootstrap.css.

How do I revise my style sheet so my page does the following? Can anyone help?

When I resize my browser window width... I don't want it to jump from width: 1170px to width: 970px and then to width: 750px

I just want my div to stay at a width of 1170px.
If I make the browser window width smaller. I want the width of my div to remain at 1170px and just show at horizontal scrollbar on the bottom of the browser window.


I read that if I can turn any fixed-width grid layout into a full-width layout by changing your outermost .container to .container-fluid.

I changed the tag of my div to

<div class="container-fluid">

</div>

When I do this it stopped resizing it to the three width sizes from above but it stretches the full width of the screen past a width of 1170px.  If I change it to container-fluid which is one of the default css classes in bootstrap.css can I just set the min and maximum width of this class to 1170px so it doesn't stretch or get smaller. I just want the width to stay at 1170px.
LVL 1
maqskywalkerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

GaryCommented:
Add this after the boostrap.css

@media (min-width: 0px) {
  .container {
    width: 1170px;
  }
}

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
CSS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.