html table issue

Posted on 2007-10-18
Last Modified: 2013-11-19
I am trying to set a border on two sides of an html table cell in visual studio 2005.  I can get one side of the cell to display a border.  It shows up in design view as well as the when I compile the code.  But, when I try to get the other side of the border displayed, it shows up in design view, but then no border appears when I compile the code.  Here is the code:

  <td style="width: 100px; height: 21px; border-left-color: black; border-top-style: solid; border-top-color: black; border-left-style: solid;">
Question by:dchau12
    LVL 4

    Expert Comment

    Does the cell in quesion contain any "contents" if not try adding "&nbsp;" to the cell contents
    LVL 28

    Accepted Solution

    I don't know about visual studio, but the HTML/CSS for this could be (for a border left and top):

    <td style="width: 100px; height: 21px;   border-left: 1px solid #000;  border-top: 1px solid #000; ">
    LVL 18

    Expert Comment

    Try this:

    <td style="width: 100px; height: 21px; border-left: #000000 solid 1px; border-top: #000000 solid 1px;">

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    Read about why website design really matters in today's demanding market.
    Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
    The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

    755 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

    19 Experts available now in Live!

    Get 1:1 Help Now