Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Table border

Posted on 2004-04-05
9
Medium Priority
?
485 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 140 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

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
 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

783 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