Solved

Table border

Posted on 2004-04-05
9
443 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
ID: 10756629
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
ID: 10756756
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
ID: 10756816
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
ID: 10756875
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 7

Expert Comment

by:MaB
ID: 10756972
>>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
ID: 10756997
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
ID: 10757037
Does these color codes work for you?

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

MaB
0
 

Author Comment

by:Pigdogmonster
ID: 10757100
They are great!

Thanks very much for your help.
0
 
LVL 7

Expert Comment

by:MaB
ID: 10757114
No problem, glad I could help!

BR MaB
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction The Google Maps API offers various ways to draw dynamic and static maps.  Using a combination of PHP and JavaScript, you can draw active JavaScript maps that allow pan-and-zoom in the client browser window.  You can also draw "static" …
This article discusses four methods for overlaying images in a container on a web page
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…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

863 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

27 Experts available now in Live!

Get 1:1 Help Now