Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Oct 2008
    Posts
    185
    Thanks
    12
    Thanked 0 Times in 0 Posts

    RESOLVED Cells Out Of Place In Table

    I can't figure out why the class "contentshop" cells (4 of them) in the table withinin the "content" div are dropped down halfway...

    Here's the page.

    What's wrong?

  • #2
    Regular Coder Lerura's Avatar
    Join Date
    Aug 2005
    Location
    Denmark
    Posts
    946
    Thanks
    0
    Thanked 129 Times in 128 Posts
    table {

    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;

    }


    tr {

    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;

    }


    td {

    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;

    }
    should be:

    table {

    width: 100%;

    }

    td {

    padding: 0;

    }
    table { height:100% } causes the table to extend to the bottom of the browser area, causing the td's to be at the same height (- border and space between the cells)
    A td is always, unless other is specified, centering it content vertically.

    If you temporary adds border="1" to the tables opening tag
    <table border="1">
    you can see what area the table and it's cells covers
    Last edited by Lerura; 08-31-2010 at 07:13 PM.

  • #3
    Regular Coder
    Join Date
    Oct 2008
    Posts
    185
    Thanks
    12
    Thanked 0 Times in 0 Posts
    Excellent. Got it! Thank you.


  •  

    Posting Permissions

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