Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Have twitter bootstrap modal scale?

Have twitter bootstrap modal scale?

Problem

I am using a "high" Modal from twitter bootsrap. Is it possible to have it scale with lower resolutions? If I choose a lower resolution I can't see the whole modal. I would like it to fit on the screen no matter what. If it does not fit I would like it to be scrollable(that actualy happens sometimes /max-height: 400px). Is the only thing I can do adjust the max height?

.modal-body {
  max-height: 400px;
  padding: 15px;
  overflow-y: auto;
}


.modal {
  position: fixed;
  top: 30%;
  left: 50%;
  z-index: 1050;
  width: 750px;
  margin: -250px 0 0 -280px;
  overflow: auto;
  background-color: #ffffff;
  border: 1px solid #999;
  border: 1px solid rgba(0, 0, 0, 0.3);
  *border: 1px solid #999;
  -webkit-border-radius: 6px;
     -moz-border-radius: 6px;
          border-radius: 6px;
  -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
     -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
          box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
  -webkit-background-clip: padding-box;
     -moz-background-clip: padding-box;
          background-clip: padding-box;
}
Problem courtesy of: user874774

Solution

.modal {
    position: absolute; 
}
Solution courtesy of: user874774

Discussion

View additional discussion.



This post first appeared on CSS3 Recipes - The Solution To All Your Style Problems, please read the originial post: here

Share the post

Have twitter bootstrap modal scale?

×

Subscribe to Css3 Recipes - The Solution To All Your Style Problems

Get updates delivered right to your inbox!

Thank you for your subscription

×