Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

bottom border in a table

Posted on 2007-11-14
2
5,436 Views
Last Modified: 2012-06-21
I am trying to get a border under the first row of my table.  Please tell me what is wrong with my code.  Thanks

<Table >
      <tr style="border-bottom-style:solid;border-bottom-width:thick;border-bottom-color:Black"><td>Incident</td><td>Assign To</TD><TD>Effective Date</td><TD>Date Assigned</TD>
</tr>
0
Comment
Question by:eshurak
2 Comments
 
LVL 28

Assisted Solution

by:TName
TName earned 50 total points
ID: 20282578
Hi, don't try to style the row (tr), just apply the style to the table and/or the TDs, e.g. try this:


<table style="border-collapse:collapse;" >     
<tr>
<td style="border-bottom:thick solid black;" >Incident</td>
<td style="border-bottom:thick solid black;" >Assign To</td>
<td style="border-bottom:thick solid black;" >Effective Date</td>
<td style="border-bottom:thick solid black;" >Date Assigned</td>
</tr>
</table>

(or give those TDs a class and apply the style to that class..)
0
 
LVL 18

Accepted Solution

by:
Morcalavin earned 200 total points
ID: 20282590
This should be what you want.  You have to apply borders to the cells, not the rows

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
      <title>Test</title>
        <style type="text/css">
              table td
            {
                  padding: 3px;
            }
              .head
            {
                   border-bottom-style:solid;
                   border-bottom-width:thick;
                   border-bottom-color:black;
            }
        </style>
        
</head>
<body>
<table cellspacing="0" cellpadding="0">
<thead>
<tr><td class="head">Incident</td><td class="head">Assign To</td><td class="head">Effective Date</td><td class="head">Date Assigned</td></tr>
</thead>
<tbody>
<tr><td>Data</td><td>Me</td><td>Yesterday</td><td>Now</td></tr>
</tbody>
</table>
</body>
</html>
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Browser Chrome downloads colored link 5 48
how to debug htl and js pages 8 39
VBScript on Html 15 47
simple html dom php accessing table/cell  values 4 22
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question