• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 517
  • Last Modified:

Table header background color not filling entire cell

I have a table header with a background color.  Problem is, I have some header cells that have one line of text and others with two lines.  The two line cells have a background color that pretty much fills the cell, but the one line cells have the background color only around the text with white space above and below.  

Here are my current CCS properties for the header...

table.sortable a.sortheader {
    background-color: #e0b4a6;
    color: black;
    font-weight: bold;
    text-decoration: underline;
    display: block;
      PADDING-RIGHT: 4px;
      PADDING-LEFT: 4px
}

0
jribble
Asked:
jribble
  • 2
1 Solution
 
GrandSchtroumpfCommented:
set the background on the cell, not on the <a>... something like this:

table.sortable th {
    background-color: #e0b4a6;
}

you might need to add a class on your <th> and use this:

table.sortable th.sortheader  {
    background-color: #e0b4a6;
}
0
 
jribbleAuthor Commented:
The first suggestion worked fine.

table.sortable th {
    background-color: #e0b4a6;
}

Thanks!
0
 
GrandSchtroumpfCommented:
<:°)
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.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now