Solved

bottom border in a table

Posted on 2007-11-14
2
5,434 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Footer at the bottom of the page not centered 5 34
html5 auto send email 7 26
Easy responsive table out of existing table 28 55
CSS Logo Problem. 2 20
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.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
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.…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

813 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now