Jump to content

Table within a table?


vozzek

Recommended Posts

Hi all,

 

I'm still new to CSS, but I seem to be running into a problem.

 

If I have a table nested within another table, can they each be assigned their own class?  Or will the outer table's class override the nested table's class assignment (as seems to be happening).  Sample bogus code:

 

<table class="tbl1" width="800">
  <tr>
    <td>
      <table class="tbl2" width="600">
        <tr>
          <td>Hello</td>
        <tr>
      </table>
    </td>
    <td>
      <table class="tbl3" width="600">
        <tr>
          <td>Hello</td>
        <tr>
      </table>
    </td>
  </tr>
</table>[code]

Rough example, but I guess it's a simple question.  Thanks!

[/code]

Link to comment
https://forums.phpfreaks.com/topic/80305-table-within-a-table/
Share on other sites

yes is will. so in your second class you need to offset the styles in the previous class.

 

But it seems maybe you are using this for a layout. Use divs instead (search google for tableless layouts)

 

Only use table for tabular data / grids from now on.

 

Good luck

Link to comment
https://forums.phpfreaks.com/topic/80305-table-within-a-table/#findComment-407015
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.