SitePoint Sponsor |
|
User Tag List
Results 1 to 2 of 2
-
Aug 16, 2003, 07:41 #1
- Join Date
- Jan 2003
- Location
- Somewhere in Indiana
- Posts
- 3,082
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Cell only 4 pixels high, can't add border?
I have a table cell that is only 4 pixels high, but css won't allow me to add a bottom border to it. Why. When I preview it, the cell looks like it may have lost 1 pixel in height (which is understandable), but the different color bottom border doesn't show up. Is this a flaw in css or are there limits to when borders can be applied?
Here is some code
.top {
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #CC6600;
}
<td height="4" bgcolor="FFCC66" class="top"></td>
Thanks
Bryan
-
Aug 16, 2003, 08:46 #2
- Join Date
- Nov 2001
- Location
- Bath, UK
- Posts
- 2,498
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Most browsers won't draw the cell unless it has content (say  
but that is going to make the height more than 4px, so give this a try and see what happens:
Code:.top { font-size: 1px; line-height: 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #CC6600; } <td height="4" bgcolor="FFCC66" class="top"> </td>
Hello World
Bookmarks