Solved

Table border

Posted on 2004-04-05
9
435 Views
Last Modified: 2010-08-05
Hi,

I have a normal table with a border.

<TABLE CELLSPACING=1 CELLPADDING=1 border=1>

What I would like is to keep the border around the edge  and the horizontal border but remove the verticle border between the TD's.

I would also like to have one every other TD to be shaded with a light grey


<tr>
            <td valign='left' halign='center'nowrap>&nbsp;<%=var2ndRun%></TD>
            <td valign='left' halign='center'nowrap>&nbsp;<%=varWeight%></TD>
            <td valign='left' halign='center'nowrap>&nbsp;<%=varTotVol%></TD>
                      <td valign='left' halign='middle'nowrap>&nbsp;<%=varTotDrops%</TD>
            <td valign='left' halign='middle'nowrap>&nbsp;<%=varLastDrop%</TD>            <td valign='left' halign='middle' nowrap> <%=varManifest%></TD>
            <td valign='left' halign='middle'nowrap><%=varBooked%>></TD>
            <td valign='left' halign='middle'nowrap><%=varBooked%>></TD>
            <td valign='left' halign='middle'nowrap><%=varBooked%>></TD>
            <td valign='left' halign='middle'nowrap><%=varBooked%>></TD>
            <td valign='left' halign='middle'nowrap><%=varBooked%>></TD>
                        
</tr>

many thanks
0
Comment
Question by:Pigdogmonster
  • 5
  • 4
9 Comments
 
LVL 7

Expert Comment

by:MaB
Comment Utility
Hi Pigdogmonster,
You'll have to use style for that.

<html>

<head>
<title>New Page 1</title>
</head>

<body>
<TABLE CELLSPACING=0 CELLPADDING=0 style="border-collapse: collapse" bordercolor="#111111">

What I would like is to keep the border around the edge and the horizontal
border but remove the verticle border between the TD's. I would also like to
have one every other TD to be shaded with a light grey


<tr>
          <td valign='left' halign='center' nowrap style="border-left-style: solid; border-left-width: 1; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1">&nbsp;<%=var2ndRun%></TD>
          <td valign='left' halign='center' nowrap style="border-left-width: 1; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1" bgcolor="#C0C0C0">&nbsp;<%=varWeight%></TD>
          <td valign='left' halign='center' nowrap style="border-left-width: 1; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1">&nbsp;<%=varTotVol%></TD>
                     <td valign='left' halign='middle' nowrap style="border-left-width: 1; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1" bgcolor="#C0C0C0">&nbsp;<%=varTotDrops%></TD>
          <td valign='left' halign='middle' nowrap>&nbsp;<%=varLastDrop%</TD>          <td valign='left' halign='middle' nowrap> <%=varManifest%></TD>
          <td valign='left' halign='middle' nowrap style="border-left-width: 1; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1"><%=varBooked%>></TD>
          <td valign='left' halign='middle' nowrap style="border-left-width: 1; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1" bgcolor="#C0C0C0"><%=varBooked%>></TD>
          <td valign='left' halign='middle' nowrap style="border-left-width: 1; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1"><%=varBooked%>></TD>
          <td valign='left' halign='middle' nowrap style="border-left-width: 1; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1" bgcolor="#C0C0C0"><%=varBooked%>></TD>
          <td valign='left' halign='middle' nowrap style="border-left-width: 1; border-right-style: solid; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1"><%=varBooked%>></TD>
                   
</tr>


<tr>
          <td valign='left' halign='center' nowrap style="border-left-style: solid; border-left-width: 1; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1">&nbsp;</TD>
          <td valign='left' halign='center' nowrap style="border-left-width: 1; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1" bgcolor="#C0C0C0">&nbsp;</TD>
          <td valign='left' halign='center' nowrap style="border-left-width: 1; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1">&nbsp;</TD>
                     <td valign='left' halign='middle' nowrap style="border-left-width: 1; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1" bgcolor="#C0C0C0">&nbsp;</TD>
          <td valign='left' halign='middle' nowrap style="border-left-width: 1; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1">&nbsp;</TD>
          <td valign='left' halign='middle' nowrap style="border-left-width: 1; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1" bgcolor="#C0C0C0">&nbsp;</TD>
          <td valign='left' halign='middle' nowrap style="border-left-width: 1; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1">&nbsp;</TD>
          <td valign='left' halign='middle' nowrap style="border-left-width: 1; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1" bgcolor="#C0C0C0">&nbsp;</TD>
          <td valign='left' halign='middle' nowrap style="border-left-width: 1; border-right-style: solid; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1">&nbsp;</TD>
                   
</tr>
</table>
</body>

</html>

BR MaB.
0
 

Author Comment

by:Pigdogmonster
Comment Utility
thats great!  thanks!

I have the shading in the TD's but still have the verticle borders. :-)

I'll paste my exact code so you can take a look.

<TABLE WIDTH="95%" BORDER=1 CELLSPACING=1 CELLPADDING=1 style="border-collapse: collapse" bordercolor="#111111">


<TR bgcolor=mediumblue>

<TD><A href="despASC.asp?sort=15&status=<%=varStatus%>&status2=<%=varStatus2%>&request=<%=varRequest%>&delDate=<%=varGetDateORIG%>"><FONT color=white><B>Haulier</FONT></B></A></TD>
            <TD><A href="despASC.asp?sort=16&status=<%=varStatus%>&status2=<%=varStatus2%>&request=<%=varRequest%>&delDate=<%=varGetDateORIG%>"><FONT color=white><B>Driver</FONT></B></A></TD>
            <TD><A href="despASC.asp?sort=17&status=<%=varStatus%>&status2=<%=varStatus2%>&request=<%=varRequest%>&delDate=<%=varGetDateORIG%>"><FONT color=white><B>Ship No</FONT></B></A></TD>
            <TD><A href="despASC.asp?sort=18&status=<%=varStatus%>&status2=<%=varStatus2%>&request=<%=varRequest%>&delDate=<%=varGetDateORIG%>"><FONT color=white><B>2nd Run</FONT></B></A></TD>
            <TD><A href="despASC.asp?sort=19&status=<%=varStatus%>&status2=<%=varStatus2%>&request=<%=varRequest%>&delDate=<%=varGetDateORIG%>"><FONT color=white><B>Weight</FONT></B></A></TD>
            <TD><A href="despASC.asp?sort=20&status=<%=varStatus%>&status2=<%=varStatus2%>&request=<%=varRequest%>&delDate=<%=varGetDateORIG%>"><FONT color=white><B>M3</FONT></B></A></TD>
            <TD><A href="despASC.asp?sort=21&status=<%=varStatus%>&status2=<%=varStatus2%>&request=<%=varRequest%>&delDate=<%=varGetDateORIG%>"><FONT color=white><B>Drops</FONT></B></A></TD>
            <TD><A href="despASC.asp?sort=22&status=<%=varStatus%>&status2=<%=varStatus2%>&request=<%=varRequest%>&delDate=<%=varGetDateORIG%>"><FONT color=white><B>Dest</FONT></B></A></TD>
            <TD><A href="despASC.asp?sort=23&status=<%=varStatus%>&status2=<%=varStatus2%>&request=<%=varRequest%>&delDate=<%=varGetDateORIG%>"><FONT color=white><B>Manifest</FONT></B></A></TD>
            <TD><A href="despASC.asp?sort=24&status=<%=varStatus%>&status2=<%=varStatus2%>&request=<%=varRequest%>&delDate=<%=varGetDateORIG%>"><FONT color=white><B>Booked Out</FONT></B></A></TD>
            <TD><A href="despASC.asp?sort=25&status=<%=varStatus%>&status2=<%=varStatus2%>&request=<%=varRequest%>&delDate=<%=varGetDateORIG%>"><FONT color=white><B>Arrival & Driver</FONT></B></A></TD>
          <TD><A href="despASC.asp?sort=26&status=<%=varStatus%>&status2=<%=varStatus2%>&request=<%=varRequest%>&delDate=<%=varGetDateORIG%>"><FONT color=white><B>Finished Loading</FONT></B></A></TD>
          <TD><A href="despASC.asp?sort=27&status=<%=varStatus%>&status2=<%=varStatus2%>&request=<%=varRequest%>&delDate=<%=varGetDateORIG%>"><FONT color=white><B>Start Loading</FONT></B></A></TD>
          <TD><A href="despASC.asp?sort=28&status=<%=varStatus%>&status2=<%=varStatus2%>&request=<%=varRequest%>&delDate=<%=varGetDateORIG%>"><FONT color=white><B>Trailier No (pre loads)</FONT></B></A></TD>
            <TD><FONT color=white><B>i</FONT></B></TD>
          </tr>
</FONT>


//This is where the data is displayed---

<tr>
            <td valign='left' halign='center' nowrap style="border-left-style: solid; border-left-width: 1; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1">&nbsp;<%=varHaulier%></TD>
            <td valign='left' halign='center' nowrap style="border-left-width: 1; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1" bgcolor="#C0C0C0">&nbsp;<%=varDriver%></TD>
            <td valign='left' halign='center' nowrap>&nbsp;<a href="JavaScript:openWindow('../shipView.asp?shipNo=<%=varShipNo%>&DelDate=<%=varDelDate%>&driverName=<%=varDriver%>&reg=<%=varReg%>&totDrops=<%=varTotDrops%>&TotVol=<%=varTotVol%>&totWeight=<%=varWeight%>')"><b><%=varShipNo%></b></a></TD>
            <td valign='left' halign='center' nowrap style="border-left-width: 1; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1" bgcolor="#C0C0C0">&nbsp;<%=var2ndRun%></TD>
            <td valign='left' halign='center' nowrap style="border-left-width: 1; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1">&nbsp;<%=varWeight%></TD>
            <td valign='left' halign='center' nowrap style="border-left-width: 1; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1" bgcolor="#C0C0C0">&nbsp;<%=varTotVol%></TD>
          <td valign='left' halign='center' nowrap style="border-left-width: 1; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1">&nbsp;<%=varTotDrops%></TD>
            <td valign='left' halign='center' nowrap style="border-left-width: 1; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1" bgcolor="#C0C0C0">&nbsp;<%=varLastDrop%></TD>
            <td valign='left' halign='center' nowrap style="border-left-width: 1; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1">&nbsp;<%if len(varManifest) >0 then %><img src='../../images/pics/tick.gif' alt='<%=varManifest%>'><%else%><input type='checkbox' value='<%=varTimeStamp%>'unchecked><%end if%></TD>
            <td valign='left' halign='center' nowrap style="border-left-width: 1; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1" bgcolor="#C0C0C0">&nbsp;<%if len(varBooked) >0 then %><img src='../../images/pics/tick.gif' alt='<%=varBooked%>'><%else%><input type='checkbox' value='<%=varBooked%>'unchecked><%end if%></TD>
            <td valign='left' halign='center' nowrap style="border-left-width: 1; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1">&nbsp;<%if len(varArrival) >0 then %><img src='../../images/pics/tick.gif' alt='<%=varArrival%>'><%else%><input type='checkbox' value='<%=varArrival%>'unchecked><%end if%></TD>
            <td valign='left' halign='center' nowrap style="border-left-width: 1; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1" bgcolor="#C0C0C0">&nbsp;<%if len(varFinishedLoad) >0 then %><img src='../../images/pics/tick.gif' alt='<%=varFinishedLoad%>'><%else%><input type='checkbox' value='<%=varFinishedLoad%>'unchecked><%end if%></TD>
            <td valign='left' halign='center' nowrap style="border-left-width: 1; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1">&nbsp;<%if len(varStartLoad) >0 then %><img src='../../images/pics/tick.gif' alt='<%=varStartLoad%>'><%else%><input type='checkbox' value='<%=varStartLoad%>'unchecked><%end if%></TD>
            <td valign='left' halign='center' nowrap style="border-left-width: 1; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1" bgcolor="#C0C0C0">&nbsp;<%=varPreLoaded_Trailer%></TD>
            <td valign='left' halign='center' nowrap style="border-left-width: 1; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1">&nbsp;<input type='image' src='../../images/submit.gif'></TD>
            </form>
            
</tr>

0
 
LVL 7

Accepted Solution

by:
MaB earned 35 total points
Comment Utility
Remove the BORDER from your table tag.
<TABLE WIDTH="95%" BORDER=1 CELLSPACING=1 CELLPADDING=1 style="border-collapse: collapse" bordercolor="#111111">
should be:
<TABLE WIDTH="95%" CELLSPACING=1 CELLPADDING=1 style="border-collapse: collapse">
And I don't think you need the style in the table tag either:
<TABLE WIDTH="95%" CELLSPACING=1 CELLPADDING=1>

MaB

0
 

Author Comment

by:Pigdogmonster
Comment Utility
Brilliant thanks buddy! ;-)  looks great!

just 2 more thing if you dont mind,

I could do with the following colours:-

pastel blue
pastel red
pastel green

How would you suggest that I tidy up the top bar, as it looks really messy now compared to the rest of the table?



<TR bgcolor=mediumblue>

<TD><A href="despASC.asp?sort=15&status=<%=varStatus%>&status2=<%=varStatus2%>&request=<%=varRequest%>&delDate=<%=varGetDateORIG%>"><FONT color=white><B>Haulier</FONT></B></A></TD>
          <TD><A href="despASC.asp?sort=16&status=<%=varStatus%>&status2=<%=varStatus2%>&request=<%=varRequest%>&delDate=<%=varGetDateORIG%>"><FONT color=white><B>Driver</FONT></B></A></TD>
          <TD><A href="despASC.asp?sort=17&status=<%=varStatus%>&status2=<%=varStatus2%>&request=<%=varRequest%>&delDate=<%=varGetDateORIG%>"><FONT color=white><B>Ship No</FONT></B></A></TD>
          <TD><A href="despASC.asp?sort=18&status=<%=varStatus%>&status2=<%=varStatus2%>&request=<%=varRequest%>&delDate=<%=varGetDateORIG%>"><FONT color=white><B>2nd Run</FONT></B></A></TD>
          <TD><A href="despASC.asp?sort=19&status=<%=varStatus%>&status2=<%=varStatus2%>&request=<%=varRequest%>&delDate=<%=varGetDateORIG%>"><FONT color=white><B>Weight</FONT></B></A></TD>
          <TD><A href="despASC.asp?sort=20&status=<%=varStatus%>&status2=<%=varStatus2%>&request=<%=varRequest%>&delDate=<%=varGetDateORIG%>"><FONT color=white><B>M3</FONT></B></A></TD>
          <TD><A href="despASC.asp?sort=21&status=<%=varStatus%>&status2=<%=varStatus2%>&request=<%=varRequest%>&delDate=<%=varGetDateORIG%>"><FONT color=white><B>Drops</FONT></B></A></TD>
          <TD><A href="despASC.asp?sort=22&status=<%=varStatus%>&status2=<%=varStatus2%>&request=<%=varRequest%>&delDate=<%=varGetDateORIG%>"><FONT color=white><B>Dest</FONT></B></A></TD>
          <TD><A href="despASC.asp?sort=23&status=<%=varStatus%>&status2=<%=varStatus2%>&request=<%=varRequest%>&delDate=<%=varGetDateORIG%>"><FONT color=white><B>Manifest</FONT></B></A></TD>
          <TD><A href="despASC.asp?sort=24&status=<%=varStatus%>&status2=<%=varStatus2%>&request=<%=varRequest%>&delDate=<%=varGetDateORIG%>"><FONT color=white><B>Booked Out</FONT></B></A></TD>
          <TD><A href="despASC.asp?sort=25&status=<%=varStatus%>&status2=<%=varStatus2%>&request=<%=varRequest%>&delDate=<%=varGetDateORIG%>"><FONT color=white><B>Arrival & Driver</FONT></B></A></TD>
         <TD><A href="despASC.asp?sort=26&status=<%=varStatus%>&status2=<%=varStatus2%>&request=<%=varRequest%>&delDate=<%=varGetDateORIG%>"><FONT color=white><B>Finished Loading</FONT></B></A></TD>
         <TD><A href="despASC.asp?sort=27&status=<%=varStatus%>&status2=<%=varStatus2%>&request=<%=varRequest%>&delDate=<%=varGetDateORIG%>"><FONT color=white><B>Start Loading</FONT></B></A></TD>
         <TD><A href="despASC.asp?sort=28&status=<%=varStatus%>&status2=<%=varStatus2%>&request=<%=varRequest%>&delDate=<%=varGetDateORIG%>"><FONT color=white><B>Trailier No (pre loads)</FONT></B></A></TD>
          <TD><FONT color=white><B>i</FONT></B></TD>
         </tr>
</FONT>
0
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.

 
LVL 7

Expert Comment

by:MaB
Comment Utility
>>How would you suggest that I tidy up the top bar, as it looks really messy now compared to the rest of the table?

Well, that depends.....

Why do you think it looks messy, and is the top bar only for presenting relevent headers for the data or for something else?

The thing is, "looking messy" is a really subjective thing so I would need a little more "meat on the bones" to know what you find messy with it, and it's hard to say when I can't see the actual content in the rest of the table.

The only thing I can say as a general statement is to use a more soothing colour that doesn't draw too much attention and to use a thicker border underlining the top bar to separate the description from the content. If you want you could also use script to have the top bar stay in place while scrolling the rest of the table if there are lot of content.

BR MaB
0
 

Author Comment

by:Pigdogmonster
Comment Utility
Thanks!

Do you have any idea or can recommend a website with colours I could use for the following?

pastel blue
pastel red
pastel green

many thanks
0
 
LVL 7

Expert Comment

by:MaB
Comment Utility
Does these color codes work for you?

#0000FF     (Blue)
#FF0000     (Red)
#00FF00     (Green)

MaB
0
 

Author Comment

by:Pigdogmonster
Comment Utility
They are great!

Thanks very much for your help.
0
 
LVL 7

Expert Comment

by:MaB
Comment Utility
No problem, glad I could help!

BR MaB
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)

743 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

17 Experts available now in Live!

Get 1:1 Help Now