Solved

bottom border in a table

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

772 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

10 Experts available now in Live!

Get 1:1 Help Now