?
Solved

bottom border in a table

Posted on 2007-11-14
2
Medium Priority
?
5,439 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
[X]
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
2 Comments
 
LVL 28

Assisted Solution

by:TName
TName earned 200 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 800 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

WordPress Tutorial 1: Installation & Setup

WordPress is a very popular option for running your web site and can be used to get your content online quickly for the world to see. This guide will walk you through installing the WordPress server software and the initial setup process.

Question has a verified solution.

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

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
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…
Suggested Courses

770 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