I am creating a BootStrap dialog box for my site through which a user can import their Google contacts. In the dialog box there is a table with 4 columns inside it. Only table headers are static; rows are dynamically populated with JavaScript code. 4 columns ...
Email | Name| Mobile | Import
When the email length is short, the table fits perfectly into the dialog box, but if the list has a long email identifier, the last 2 columns (Mobile, Import) are not suitable in the dialog box
HTML code ..
<div class="modal fade" id="myModalTable"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">Γ</button> <h3 class="modal-title">Import Google Contacts</h3> </div> <div class="modal-body"> <h5 class="text-center">Please Select the Google Contacts you want to Import</h5> <table id="friendsoptionstable" class="table table-striped"> <thead> <tr> <th class="tablecell" width:" auto !important">Email</th> <th class="tablecell">Name</th> <th class="tablecell">Mobile</th> <th class="tablecell">Import</th> </tr> </thead> <tbody> </tbody> </table> </div> <div class="modal-footer"> <button type="button" class="btn btn-default " data-dismiss="modal" onclick="redirectToPrevPage()">Cancel</button> <button class="btn btn-primary" id="addcheckedfriends1" onclick="add_checked_friends()">Save Selected Friends</button> </div> </div> </div> </div>
As you can see on the screen, because the third email id is too long, the last two columns are outside the dialog box. I want long emails to be wrapped to the second line so that the whole table fits inside the dialog box. I tried to set the width of this table header to achieve this, but the problem remains. I can not understand where I am mistaken. Please, help..
source share