Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

bottom border in a table

Posted on 2007-11-14
2
Medium Priority
?
5,440 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

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…
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 add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
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…

636 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