Web Analytics Made Easy -
StatCounter tables: horizontal line between rows - CodingForum

Announcement

Collapse
No announcement yet.

tables: horizontal line between rows

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • tables: horizontal line between rows

    Hi,

    How can I get a CSS-compliant horizontal rule between table rows. I know there's mention of it in the CSS spec, but it's too obtuse for me. Also, is it well supported in the browsers?

    Thanks...

  • #2
    You might try setting a table attribute: rules="rows"
    hmm... ?

    Comment


    • #3
      Thanks for the reply. I now have "<table id="results" frame="void" rules="rows">", which gets me where I want, except:

      1. on IE/Windows, the bar is ugly... how can I get a single-pixel rule? (looks great on Opera, Netscape)

      2. how can I control padding above/below this line?

      All in a CSS savvy way, of course!

      Comment


      • #4
        Something like this, maybe:

        table{
        border-collapse:collapse
        }
        td{
        border-color:#0000ff
        }
        hmm... ?

        Comment


        • #5
          How about:
          Code:
          td { border-bottom: 1px solid #000 }
          David House - Perfect is achieved, not when there is nothing left to add, but when there is nothing left to take away. (Antoine de St. Exupery).
          W3Schools | XHTML Validator | CSS Validator | Colours | Typography | HTML&CSS FAQ | Go get Mozilla Now | I blog!

          Comment


          • #6
            After some experimention, the only cross-browser, validating solution I could come up with is:
            Code:
            <style type="text/css">
            	td { border-top: 1px solid black; }
            </style>
            
            <table cellspacing="0" frame="void" rules="rows">
            	<tr><th>ID</th><th>Name</th></tr>
            	<tr><td>1</td><td>Laurel</td></tr>
            	<tr><td>2</td><td>Hardy</td></tr>
            </table>
            See http://www.hoologic.com/lines_between_rows/ for more information.

            Comment

            Working...
            X