header{
text-align: center;
}
.page,form {
    margin: 0 auto
}

form {
    width: 500px
}

input[type=submit] {
    border: 1px solid #eee;
    padding: 10px
}

input[type=text] {
    width: 85%;
    border: 1px solid #eee;
    padding: 10px
}
#myNavbar {
    float: right;
}
.page {
    width: 960px;
}
#gallery img {
  height: 300px;
  width: 240px;
  background: #ddd;
}

#gallery p {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#gallery h3 {
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: #af3131;
    margin: 0;
    color: #fff;
    font-weight: 600;
    padding: 1em;
}
#gallery h3:hover {
    white-space: pre-line;
    overflow: hidden;
}
.grid {
      list-style:none;
      overflow: hidden;
        padding: 0.5em 0 0 0.5em;
            max-width: 76em;
            margin: 0 auto;
        }
        .grid li {
            padding: 0 1em;
            text-align: center;
            height: 380px;
            margin: 10px 0px;
            border-top: 1px solid #eee;
        }
        .grid li > img {
      display:block;
       max-width:100%;
            padding: 0 1em;
            text-align: center;
        }
        .grid li a {
            color: #fff;
        }
        
        @media all and (min-width: 27em) {
            .grid li {
                width: 50%;
                float: left;
            }
        }
        
        @media all and (min-width: 40em) {
            .grid li {
                width: 33.3333333%;
            }
            .grid li.wide {
                width: 66.666666%;
            }
        }
        @media all and (min-width: 60em) {
            .grid li {
                width: 25%;
            }
            .grid li.wide {
                width: 50%;
            }
        }

#related {
    margin-top: 20px;
    padding: 50px;
}
.back {
    background-image: url("http://moheban-ahlebeit.com/images/White-Books-Wallpaper/White-Books-Wallpaper-16.jpg");
    background-repeat: no-repeat;
    background-position: left bottom;
}
#related a {
    color: #333;
}
.navbar {
    margin-bottom: 0;
    border-radius: 0!important
}
.box{
    width:100%;
    height:300px;
    background-color:rgb(41, 128, 185);
}
footer {
    background-color: #3c763d;
    padding: 25px;
    margin-bottom: 0;
    color: #ddd;
}

.navbar {
    margin-bottom: 0px !important;
}

.jumbotron .btn{
    border-radius:0px!important;
    box-shadow:1px 1px 4px rgba(0,0,0,0.4);
    padding:10px 40px;
}
.navbar-inverse .navbar-nav > li > a {
    color: #f2f2f2 !important;
}
.navbar-inverse {
    background-color: #3c763d !important;
    border-color: #3c763d !important;
}
.navbar-inverse .navbar-brand {
    color: #f2f2f2 !important;
}
.navbar-inverse .navbar-nav > .active > a, .navbar-inverse .navbar-nav > .active > a:focus, .navbar-inverse .navbar-nav > .active > a:hover {
    color: #fff;
    background-color: #3c763d !important;
}
#overlay {
    width: 100%; /* Full width (cover the whole page) */
    height: 100%; /* Full height (cover the whole page) */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5); /* Black background with opacity */
    z-index: 2; /* Specify a stack order in case you're using a different order for other elements */
    cursor: pointer; /* Add a pointer on hover */
    text-align: center;
}

@media (max-width:600px) {
    #myNavbar {
    float: none;
    }
    form {
        margin: 0 auto;
        width: 300px
    }
    input[type=text] {
        width: 70%;
        border: 1px solid #eee;
        padding: 10px
    }
}