Results 1 to 10 of 10

Thread: Gap at end of Bootstrap table

  1. #1
    Join Date
    Feb 2013
    Location
    California
    Posts
    86
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Default Gap at end of Bootstrap table

    I am in the process of redoing a large web site with bootstrap. Everything is going smoothly except for one cosmetic issue. I use several tables within the structure and notice that at the end of a table there is a large gap. In viewing the page with "Inspect Element" nothing shows up for this area. After several hours of investigation I realized that if the table is wrapped in a col class the gap is present. If not wrapped, then there is no gap.

    Any idea why this is happening and how to remove the gap if the table is wrapped in a col class?

    TIA for any assistance.
    jdadwilson

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    We need to see an example to troubleshoot.
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  3. #3
    Join Date
    Feb 2013
    Location
    California
    Posts
    86
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Default

    Use the following steps to see an example...

    1. Access the following website www.txfannin.org/new-site/sitesearch.php
    2. Step 1 check the 'Books On-site' box and uncheck the 'Cemetery Records' box.
    3. Step 2 enter 'George' in the first name box and 'Wilson' in the last name box.
    4. Step 3 submit the 'Search'

    Note that the first table is wrapped in a col class and the second table is not.

    TIA for your assistance
    jdadwilson

  4. #4
    Join Date
    Nov 2014
    Location
    On A Scottish Island
    Posts
    488
    Thanks
    0
    Thanked 62 Times in 58 Posts

    Default

    Your CSS file "bootstrap.min.css" states that the "col-md-4" class should have a width of 33.3333333% and float left. That's what I'm seeing.

    I should add that this is only for screen widths greater than 992px. For narrower screens it appears to be around 95%.
    Last edited by styxlawyer; 09-15-2015 at 03:16 PM.

  5. #5
    Join Date
    Feb 2013
    Location
    California
    Posts
    86
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Default

    Yes, that is the standard Bootstrap definition for col-md-4. But that has nothing to do with the gap at the bottom of the table created by the col wrap.

  6. #6
    Join Date
    Nov 2014
    Location
    On A Scottish Island
    Posts
    488
    Thanks
    0
    Thanked 62 Times in 58 Posts

    Default

    That table has three classes:

    Code:
    <table class="table table-striped table-hover">
    The class "table" is set to have "margin-bottom: 20px;" that appears to be where the gap is coming from. The "table" class is also applied to the "School Yearbooks Records" table and it has the same gap at the bottom.

  7. #7
    Join Date
    Feb 2013
    Location
    California
    Posts
    86
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the help. Removing the table class solved the problem but made the table collapse to a much narrower table than desired. I included the table class but set the margin-bottom to 0 which helped. I also moved the row count/TOP into the footer with a colspan for each so that the count appears to the left and the TOP to the right.

    Thanks a bunch for your assistance.
    jdadwilson

  8. #8
    Join Date
    Nov 2014
    Location
    On A Scottish Island
    Posts
    488
    Thanks
    0
    Thanked 62 Times in 58 Posts

    Default

    You're welcome.

    Some of your tables appear to have "class" attributes with no value assigned which affects table and column widths. It would probably be best to create a custom class for the tables and apply it to all of them.

  9. #9
    Join Date
    Feb 2013
    Location
    California
    Posts
    86
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Default

    I am in the process of changing all of the site to Bootstrap. There are 100+ modules that I am working through. I converted some but not all of the tables you see. I have completed most of them but have not uploaded them to the test site.

    Again, thank you for your insight and assistance.
    jdadwilson

  10. #10
    Join Date
    Nov 2014
    Location
    On A Scottish Island
    Posts
    488
    Thanks
    0
    Thanked 62 Times in 58 Posts

    Default

    Have fun!

Similar Threads

  1. Bootstrap Table Rollover
    By jdadwilson in forum CSS
    Replies: 2
    Last Post: 09-03-2015, 07:05 AM
  2. Replies: 2
    Last Post: 03-19-2015, 02:14 PM
  3. Responsive Bootstrap DDMegamenu
    By mulaus in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 02-13-2015, 08:24 AM
  4. Need help with Twitter Bootstrap Carousel
    By katiebugla in forum Other
    Replies: 1
    Last Post: 10-16-2012, 10:16 PM
  5. Hover Menu, Show/Hide Div, Bootstrap Tab
    By chronixx in forum CSS
    Replies: 1
    Last Post: 06-15-2012, 06:34 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •