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
Solved

Table border

Posted on 2004-04-05
9
453 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
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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.

 

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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Suggested Solutions

Title # Comments Views Activity
Can you async load a page from another site in a Marketo Landing Page 4 25
parse url to form? 7 25
Load data upon clicking a button 8 35
Fix Form size HTML 16 15
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
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.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
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).

839 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