tags:

views:

27

answers:

2

<div id="container">

<div class="main_div">

  <div class="cell1">1</div>
  <div class="cell2">2</div>

    <table>
     <tr>

       <td > The Tag </td>
        <td> The  Tag </td>
             .....
          more data
      </tr>

     </table>
</div>
</div>

</body>
</html>

Here the Table won't fit the container when i try to do. How can achieve to fit the table in "container tag? any idea?

css #container{ margin:0 auto; width:640px; }

Table width:900px; /* how to fit shall i reduce the container to table width */ or no solution? My container has the left and right side gap & when i include the table it look odd and not fit the container box ?

A: 

huh? Why are you making the table bigger than the container if you want it to fit inside the container?

Try:

table
{
    width:100%;
}

If that's not what you meant, you need to be more clear with your question because I'm really not understanding your thought process here.

fearofawhackplanet
I added the brif about my doubt
venkat
+1  A: 

You can't have the table that's 900px fit in a container that's 640px. It's best to declare the width in one of them and have the other take on that width:

#container { width: 900px; }
table { width: 100%; }
CrazyJugglerDrummer