Question

For education I tried to make my site in a sort of flat design, I use bootstrap as framework. I installed an google custom search as the site search.

In firefox no problems at all, but when I open my site in IE (the usual course of messup), it gets pushed outside the header in a full width

The searchbar gets to 80% width on 1000px or lower, but in ie its 100% all the time. (I'm using IE 11)

I couldn't find any code that should be off

    .cse .gsc-control-cse, .gsc-control-cse {
    background-color: transparent !important;
    border: none !important;
}
.gsc-control-cse {
    border:none !important;
    background-color: transparent !important;
}
input.gsc-search-button, input.gsc-search-button:hover, input.gsc-search-button:focus {
    border-color: none !important;
    background-color: #3cb878 !important;
    background-image: none;
    filter: none;
}

input.gsc-input, .gsc-input-box, .gsc-input-box-hover, .gsc-input-box-focus {
    border-radius: 5px;
}
input#gsc-i-id1.gsc-input0 {
    background-image: none !important;
    background-color: #fff;
}
input.gsc-search-button, input.gsc-search-button:hover, input.gsc-search-button:focus {
    border-color: #369;
    background-color: #3CB878;
    background-image: none;
    min-height:25px;
    filter: none;
}

.gsc-search-box {
  height: 100%;
  margin-top: 20px;
  display: inline-block;
}
/*google*/
.social .pull-left{
  overflow: hidden;

}
#gsc-i-id1.gsc-input{
  background-color: #fff;
  background-image: none !important;
}
.gsc-control-cse, .gsc-control-cse{
  height: 30px;
  margin:0px !important;
  padding: 0px !important;
  border: 0px !important;
  background-color: transparent !important;
}
.gsc-control-cse {
  border: 0px !important;
  background-color: transparent !important;
}
input.gsc-search-button{
  height: 25px !important;
}
.gsc-input-box{
  border-radius: 5px ;
  background-image: none !important;
}
.gsc-search-button .gsc-search-button-v2 {
  background-image: url(../img/search_box_icon.png);
  background-repeat: no-repeat;
  background-position: center center;
  border: 0px !important;
}
.gsc-search-button .gsc-search-button-v2:hover {
  background-color: #00a651 !important;
  background-image: url(../img/search_box_icon.png);
}
.gsc-search-box .gsc-input {
  line-height: 0px !important;
}

@media (max-width: 1000px) {
  #___gcse_0{
  width: 80%;
  margin: 0 auto;
}

Is it possible IE is struggling with the media queries ?

The online sample is http://jurjenfolkertsma.nl/bootstrap/

Was it helpful?

Solution

I got working by adding changes to the stylesheet:

.navbar-right {
  width: 200px; /* Change it if needed */
}

@media (max-width: 1000px) {
  .navbar-right{
    width: auto;
  }
}

Also the only CSS written for .navbar-right I saw was margin-right: -15px;. Don't know if this was intended or some of your code is missing. :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top