Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8690915
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:00:32+00:00 2026-06-13T00:00:32+00:00

This is an experiment I’m working on for a layout. I had a lot

  • 0

This is an experiment I’m working on for a layout. I had a lot of issues positioning divs to achieve this effect, so I turned to the old standby, table cascades. My problem here is that that last upper box has extra padding in all 3 browsers and I cannot seem to CSS or HTML it away no matter what I try. The red boxes should be flush over the green bits you see surrounding them and there shouldn’t be a 1px visible green line to the right of the blue row between the red boxes. Any insight would be extremely appreciated.

<!doctype html>
<html>
<head>
<style>
 table { border-collapse: collapse; border-spacing: 0; padding: 0; margin: 0;}

td table { border-collapse: collapse; border-spacing: 0; padding: 0; margin: 0;}

img { display: block; }
</style>
</head>
<body style="background-color: black;">
<table style="background-color: white; height: 525px; width: 3200; padding-top: 25px;  padding-bottom: 25px;">
<tr>
 <td colspan="1" style="width: 350px;">
   <table class="container" style="height: 475px; width: 350px; margin-left: 25px; margin-right: 25px;">
    <tr>
  <td style="background-color: green; height: 225px; width: 350px;" colspan="3">

  </td>
</tr>
<tr>
  <td style="background-color: blue; height: 25px; width: 350px;" colspan="3">

  </td>
</tr>
<tr>
  <td style="background-color: green; height: 200px; width: 175px;">

  </td>
  <td style="background-color: blue; height: 200px; width: 25px;">

  </td>
  <td style="background-color: green; height: 200px; width: 125px;">

  </td>
</tr>
</table>
</td>

<td colspan="1" style="width: 125px;">
<table class="container" style="height: 475px; width: 125px; margin-right: 25px;">
<tr>
  <td style="background-color: red; height: 475px; width: 125px;">

  </td>
</tr>
</table>
</td>

<td colspan="1">
<table class="container" style="height: 475px; width: 450px; margin-right: 25px;">
<tr>
  <td style="background-color: green; height: 25px; width: 225px;">

  </td>
  <td style="background-color: blue; height: 225px; width: 25px;" >

  </td>
  <td style="background-color: green; height: 225px; width: 225px;" >

  </td>
</tr>
<tr>
  <td style="background-color: blue; height: 25px; width: 450px;" colspan="3">

  </td>
</tr>
<tr>
  <td style="background-color: green; height: 200px; width: 450px;" colspan="3">

  </td>
</tr>
</table>
</td>

<td colspan="1">
<table class="container" style="height: 475px; width: 400px; margin-right: 25px;">
<tr style="height: 225px;">
  <td style="background-color: green; height: 225px; width: 275px;">

   <table style="width: 100%; height: 225px;">

    <tr>
         <td style="height: 100px; width: 225px; background-color: red;">

         </td>      
        </tr>

        <tr>
         <td style="background-color: blue; height: 25px; width: 225px;">

         </td>
        </tr>      

        <tr>
         <td style="height: 100px; width: 225px; background-color: red;">

         </td>      
        </tr>

       </table>       

  </td>
  <td style="background-color: blue; height: 225px; width: 25px;" >

  </td>
  <td style="background-color: green; height: 225px; width: 100px;" >

  </td>
</tr>
<tr>
  <td style="background-color: blue; height: 25px; width: 400px;" colspan="3">

  </td>
</tr>
<tr>
  <td style="background-color: green; height: 200px; width: 400px;" colspan="3">

  </td>
</tr>
</table>
</td>

</table>
</td>

</table>

</body>
</html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T00:00:33+00:00Added an answer on June 13, 2026 at 12:00 am

    Do you mean this?

    http://jsfiddle.net/Nq8Us/1/

    I’ve edited your code and removed the extra ‘padding’ of green under red in question, by removing inline-styling, then added some styles in css pointing to the #problem_cell_table.

    I suggest you remove all your inline styling and shift them to the stylesheet. Inline-styling overrides all stylesheet code. That’s bad and also explains why you don’t get any effect from stylesheet changes.

    As to why there’s a padding, it’s because your main table’s height that is wrapping all the rows, cells, and inner-tables, is higher than the declared row height added together. The cells in your all the rows automatically adjusts it’s size to compensate for pixels that doesn’t add up to your total declared of 525px.

    In the example I’ve done, I “cheated” by setting css of the inner-table to height: 100% so it will expand to fit the height, should miscalculations occur.

    Give me a moment, I’ll add more to the <div> styling methods in my answer.

    Edit:

    Ok here my attempt at the layout using <div> and CSS. http://jsfiddle.net/XbFcJ/

    Remember to use a CSS Reset Stylesheet first!

    The CSS:

    <style>
    body{
        background: black;
    }
    
    .wrapper{
    }
    
    .container{
        width: 1500px;
    }
    
    .content-table {
        border: 25px solid #fff;
        overflow: hidden;
        background: #fff;
    }
    
    .content-column {
        margin-right: 25px;
        float: left;
        height: 475px;
    }
    
    .content-column.last {
        margin-right: 0;
    }
    
    .first, .third, .last {
        width: 425px;
        background-color: green;
        margin-right: 25px;
    }
    
    .top{
        height: 225px;
        border-bottom: 25px solid blue;
    }
    
    .left {
        height: 225px;
        width: 200px;
        border-right: 25px solid blue;
    }
    
    .content-column.second {
        width: 100px;
        background-color: red;
    }
    
    .last .left {
        background-color: red;
    }
    
    .last .left .top {
        height: 100px;
        border-bottom: 25px solid blue;
    }​
    </style>
    

    The HTML:

    <body>
    <div class="wrapper">
        <div class="container">
            <div class="content-table">
                <div class="content-column first">
                    <div class="top">
                    </div>
                    <div class="bottom">
                        <div class="left">
                        </div>
                    </div>
                </div>
                <div class="content-column second">
                </div>
                <div class="content-column third">
                    <div class="top">
                        <div class="left">
                        </div>
                    </div>
                    <div class="bottom">
                    </div>
                </div>
                <div class="content-column last">
                    <div class="top">
                        <div class="left">
                            <div class="top">
                            </div>
                        </div>
                    </div>
                    <div class="bottom">
                    </div>
                </div>
            </div>
        </div>
    </div>
    </body>​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm doing a little experiment, trying to alternate background colours for nested divs. This
I had this thought experiment of installing an OS on a php server over
My coworker did this experiment: public class DoubleDemo { public static void main(String[] args)
I am trying to experiment this parameter in MapReduce and I have some question.
This sounds funny..just a little experiment. i wanted to simulate a drag drop of
I get this problem while doing some experiment with set . I use a
This is a bit of an odd question and more of a though experiment
Problem This question actually came up at work today. We are planning an experiment
I'm trying to accomplish what's being demonstrated at this site for an experiment I'm
I tried this experiment with Digital Image Processing - 2D DCT/IDCT ( image compression

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.