Solved

Table border

Posted on 2004-04-05
9
472 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
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…

635 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