Don’t Go crazy Trying to Resize Twitter’s Bootstrap CSS Modal Windows

I was in the middle of a project where I needed to implement modal windows.
After playing around with colorbox, I suddenly realised that the CSS framework (Twitter Bootstrap) which I was using at that time, had options to display modal windows.

So after a quick lookup on the documentation, and then trying out a few demonstrations, I decided it was time to replace colorbox with the Bootstrap modal windows.

After hours of tweaking here and there, I ended up almost completely exhausted from trying to figure out why the modal window size just wouldn’t change and remain in the center. The SPAN tags sizes were suddenly behaving as though they weren’t based on the framework.

After trying all the things I thought were logical solution and failing over and over, I decided to finally consult the G-oracle.
Finally, I found this solution / hack to fix this little problem which requires that I specify the width in CSS to give a non-fluid layout. Another option was to use Javascript to compute the width and position of the modal window.
You can find the complete load down on GitHub with sample code included./issues/675

 

Advertisements

5 thoughts on “Don’t Go crazy Trying to Resize Twitter’s Bootstrap CSS Modal Windows

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s