Thread: TBODY Bordering

    #1
  1. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2009
    Posts
    676
    Rep Power
    7

    TBODY Bordering


    My simple task is to define a border and background color to the TBODY of my table. I haven't made any attempt at the coloring yet. I've tried a handful of things and even ran Google for a bit with no luck. Many people ask how to do this, but any answers that help them don't seem to work for me. Atm, my table has no true content, similar to below. Any help how to border JUST the TBODY?
    Code:
    <DIV id="DoA">
      <H3>Parts Damaged On Arrival</H3>
      <HR />
      Were their parts damaged on arrival? &nbsp;
      <DIV style="border: #E0E0E0 1px solid;display: inline-block;">
        &nbsp;<INPUT name="doa" type="radio" value="1" /> Yes&nbsp;
        &nbsp;<INPUT name="doa" type="radio" value="0" /> No&nbsp;
      </DIV>
      <BR />
      <TABLE>
        <THEAD>
          <TR>
            <TH>Part Number</TH>
            <TH>Description</TH>
            <TH>Serial Number</TH>
            <TH>Qty</TH>
          </TR>
        </THEAD>
        <TBODY>
          <TR>
            <TD>This</TD>
            <TD>part</TD>
            <TD>is a</TD>
            <TD>list</TD>
          </TR>
        </TBODY>
      </TABLE>
    </DIV>
    Sorry for the duplicate post in CSS. Wasn't sure best spot.
    He who knows not and knows not he knows not: he is a fool - shun him. He who knows not and knows he knows not: he is simple - teach him. He who knows and knows not he knows: he is asleep - wake him. He who knows and knows he knows: he is wise - follow him
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2013
    Posts
    6
    Rep Power
    0
    You should be able to achieve this by using a style. Just a simple example can be

    <TBODY style="background-color:#E0E0E0;">

    I hope this helps.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2009
    Posts
    676
    Rep Power
    7
    Well, I been aiming for such with inline style and via CSS. No luck. It's sounding to be an IE9 or less issue. Haven't tried the background item, yet. Focusing on the bordering atm. Any attempts w/ responses on my other post have been no success, so I'll prolly have to border the cells themselves. :-/
    He who knows not and knows not he knows not: he is a fool - shun him. He who knows not and knows he knows not: he is simple - teach him. He who knows and knows not he knows: he is asleep - wake him. He who knows and knows he knows: he is wise - follow him
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2009
    Posts
    676
    Rep Power
    7
    Now this really puts something out there that makes zero sense. This first link has the 2 items I am running. HTML & CSS. A direct view of this via my site looks this way.

    HOWEVER... If you copy the content from there, and overwrite the content in the second link, and re-run it, it shows up AS I WANT. WTF?! Both screens are now identical via code, but not the output. :-(

    Clean Straight Input of Code

    Copy and paste to this one.

    And not only that, but H3 tags only process in the first one, n not the second...


    But best post out there to cover it all, eve if the coding ain't as intended, is:
    Stack Overflow - Add borders on <tbody>
    1st half is the way I wanted, but 2nd half made it happen.
    Last edited by Triple_Nothing; December 26th, 2013 at 01:19 PM.
    He who knows not and knows not he knows not: he is a fool - shun him. He who knows not and knows he knows not: he is simple - teach him. He who knows and knows not he knows: he is asleep - wake him. He who knows and knows he knows: he is wise - follow him

IMN logo majestic logo threadwatch logo seochat tools logo