1

Responsive website with a red (left) column and a blue (right) column. The red column has a black element with margin-top:30px

When the website is resized and the blue column jumps down under the red column, the red column "inherits" the margin-top.. How can this this be avoid?

http://www.bluemachines.dk/_bootstrap/downsize/

clarkk
  • 27,151
  • 72
  • 200
  • 340

2 Answers2

1

It is due to media query used in Bootstrap!

You need to learn media queries for that or if you don't need media queries! Don't use classes of Bootstrap in navigation!

Put this into @media (min-width: 768px) and (max-width: 979px) and it works perfectly.

.nav-collapse, .nav-collapse.collapse {
    overflow: visible;
}   
.navbar .btn-navbar {
    display: none;
}   

or

You can also stop the navbar from stacking by changing the @grid-float-breakpoint variable to 1px

or

Media queries works on browser width for mobile devices u can also specify your style in media query css

@media(max-width:767px){}
@media(min-width:768px){}
@media(min-width:992px){}
@media(min-width:1200px){}

Here is link for disabling media queries

Suresh Karia
  • 17,550
  • 18
  • 67
  • 85
1

Try this:

    <div class="col-md-4 col-lg-4 col-xs-4 col-sm-4">
              Your Content
    </div>
    <div class="col-md-8 col-lg-8 col-xs-8 col-sm-8">
              Your Content
    </div>

Give classes for all the screen size, the problem solves!!!!

Suganth G
  • 5,136
  • 3
  • 25
  • 44