5 Replies Latest reply on Aug 18, 2007 6:43 AM by Newsgroup_User

    css+table

    Ma_Wing_Pui
      I have this table, how can I make it in standard css? like class=, then specify the style in style tag???

        • 1. Re: css+table
          Level 7
          On Sat, 18 Aug 2007 08:42:39 +0000 (UTC), "Ma Wing Pui"
          <webforumsuser@macromedia.com> wrote:

          >I have this table, how can I make it in standard css? like class=, then specify
          >the style in style tag???
          >
          >
          >
          > <table border="1" width="100%" id="table1" cellspacing="0" cellpadding="0"
          >style="border-collapse: collapse">
          > <tr>
          > <td>?</td>
          > <td>?</td>
          > </tr>
          > <tr>
          > <td>?</td>
          > <td>?</td>
          > </tr>
          > </table>


          what do you want to do ?

          format backgrounds, text sizes within cells ?
          border colors etc ?


          apply a class or id to the whole table as you have done - then define
          the styles in the style sheet


          #table1 {border-color:red } etc etc
          #table1 td (border: 1px solid #CC0000;
          font-size: 1em; padding: 0.1em 0.5em; }

          etc etc






          --

          ~Malcolm N....
          ~
          • 2. Re: css+table
            Ma_Wing_Pui Level 1
            I mean
            border="1" width="100%" cellspacing="0" cellpadding="0" style="border-collapse: collapse" this is in the <table>tag

            How can I set these values in the <style type="text/css"> </style> tag?
            • 3. Re: css+table
              Level 7
              On Sat, 18 Aug 2007 11:08:23 +0000 (UTC), "Ma Wing Pui"
              <webforumsuser@macromedia.com> wrote:

              >I mean
              >border="1" width="100%" cellspacing="0" cellpadding="0" style="border-collapse: collapse" this is in the <table>tag
              >
              >How can I set these values in the <style type="text/css"> </style> tag?


              .tablexx {border:1px; width:100%; border-spacing:0; padding:0;
              border-collapse:collapse }

              A good reference book is invaluable - HTML, XHTML & CSS by Elizabeth
              Castro is highly recommended.




              --

              ~Malcolm N....
              ~
              • 4. Re: css+table
                Level 7
                Note that border-spacing is not well supported. It's best to still use the
                cellspacing attribute in the table tag for that.

                --
                Murray --- ICQ 71997575
                Adobe Community Expert
                (If you *MUST* email me, don't LAUGH when you do so!)
                ==================
                http://www.dreamweavermx-templates.com - Template Triage!
                http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
                http://www.dwfaq.com - DW FAQs, Tutorials & Resources
                http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
                ==================


                "Malcolm N_" <malcom@mgnixon.org.uk> wrote in message
                news:ncndc3p7vt65ijs3sofc37v46ov56bu2t6@4ax.com...
                > On Sat, 18 Aug 2007 11:08:23 +0000 (UTC), "Ma Wing Pui"
                > <webforumsuser@macromedia.com> wrote:
                >
                >>I mean
                >>border="1" width="100%" cellspacing="0" cellpadding="0"
                >>style="border-collapse: collapse" this is in the <table>tag
                >>
                >>How can I set these values in the <style type="text/css"> </style> tag?
                >
                >
                > .tablexx {border:1px; width:100%; border-spacing:0; padding:0;
                > border-collapse:collapse }
                >
                > A good reference book is invaluable - HTML, XHTML & CSS by Elizabeth
                > Castro is highly recommended.
                >
                >
                >
                >
                > --
                >
                > ~Malcolm N....
                > ~


                • 5. Re: css+table
                  Level 7
                  .oO(Ma Wing Pui)

                  >I have this table, how can I make it in standard css? like class=, then specify
                  >the style in style tag???
                  >
                  >
                  >
                  > <table border="1" width="100%" id="table1" cellspacing="0" cellpadding="0"
                  >style="border-collapse: collapse">
                  > <tr>
                  > <td>?</td>
                  > <td>?</td>
                  > </tr>
                  > <tr>
                  > <td>?</td>
                  > <td>?</td>
                  > </tr>
                  > </table>

                  HTML:

                  <table class="foo">
                  ...
                  </table>

                  CSS:

                  .foo {
                  border-collapse: collapse;
                  width: 100%;
                  }

                  .foo td {
                  padding: 0;
                  border: 1px solid #000; /* adjust color as necessary */
                  }

                  Micha