Solved

borders around multiple tables

Posted on 2003-10-29
5
1,833 Views
Last Modified: 2010-04-09
i have a webpage im working on with tables.

i cant figure out how to boarder the tables.

while each table has its own cellspacing, cellpadding, and border settings, how do i place a border around them all, enclosing ALL of the below tables with one border ... example below:



--->>  wanting border around all of this below,  starting here in the script  <<---

<table width=100% cellspacing=0 cellpadding=0 border=0 bordercolor=gray>
<tr>
<td width="100%"><font class=peq color=eeeeee><CENTER>Main Heading<CENTER></font></td>
</tr>
</table>

<table width=100% cellspacing=0 cellpadding=0 border=1 bordercolor=gray>
<tr>
<td width="100%"><font class=peq color=eeeeee><CENTER>sub heading<CENTER></font></td>
</tr>
</table>

<table width=100% cellspacing=0 cellpadding=0 border=0>
<tr>
<td width="20%" valign=top bgcolor="000000"><font class=peq><a href="http://web-site.com/"><center>link text</a></center></font></td>
<td width="20%" valign=top bgcolor="000000"><font class=peq><a href="http://web-site.com/"><center>link text</a></center></font></td>
<td width="20%" valign=top bgcolor="000000"><font class=peq><a href="http://web-site.com/"><center>link text</a></center></font></td>
<td width="20%" valign=top bgcolor="000000"><font class=peq><a href="http://web-site.com/"><center>link text</a></center></font></td>
<td width="20%" valign=top bgcolor="000000"><font class=peq><a href="http://web-site.com/"><center>link text</a></center></font></td>
</tr>
</table>

<table width=100% cellspacing=0 cellpadding=0 border=0>
<tr>
<td width="20%" valign=top bgcolor="000000"><font class=peq><a href="http://web-site.com/"><center>link text</a></center></font></td>
<td width="20%" valign=top bgcolor="000000"><font class=peq><a href="http://web-site.com/"><center>link text</a></center></font></td>
<td width="20%" valign=top bgcolor="000000"><font class=peq><a href="http://web-site.com/"><center>link text</a></center></font></td>
<td width="20%" valign=top bgcolor="000000"><font class=peq><a href="http://web-site.com/"><center>link text</a></center></font></td>
<td width="20%" valign=top bgcolor="000000"><font class=peq><a href="http://web-site.com/"><center>link text</a></center></font></td>
</tr>
</table>

<table width=100% cellspacing=0 cellpadding=1 border=0>
<tr>
<td width="20%" valign=top bgcolor="000000"><font class=peq><a href="http://web-site.com/"><center>link text</a></center></font></td>
<td width="20%" valign=top bgcolor="000000"><font class=peq><a href="http://web-site.com/"><center>link text</a></center></font></td>
<td width="20%" valign=top bgcolor="000000"><font class=peq><a href="http://web-site.com/"><center>link text</a></center></font></td>
<td width="20%" valign=top bgcolor="000000"><font class=peq><a href="http://web-site.com/"><center>link text</a></center></font></td>
<td width="20%" valign=top bgcolor="000000"><font class=peq><a href="http://web-site.com/"><center>link text</a></center></font></td>
</tr>
</table>

<table width=100% cellspacing=0 cellpadding=1 border=0>
<tr>
<td width="20%" valign=top bgcolor="000000"><font class=peq><a href="http://web-site.com/"><center>link text</a></center></font></td>
<td width="20%" valign=top bgcolor="000000"><font class=peq><a href="http://web-site.com/"><center>link text</a></center></font></td>
<td width="20%" valign=top bgcolor="000000"><font class=peq><a href="http://web-site.com/"><center>link text</a></center></font></td>
<td width="20%" valign=top bgcolor="000000"><font class=peq><a href="http://web-site.com/"><center>link text</a></center></font></td>
<td width="20%" valign=top bgcolor="000000"><font class=peq><a href="http://web-site.com/"><center>link text</a></center></font></td>
</tr>
</table>

--->>  wanting boarder around the above, ending here  <<---


took me forever to figure all this out and code it to look like it does, but jsut cant figure this out !

thanks in advance !!!!!!

i love you guys !!!!!!!!
0
Comment
Question by:sanctify
  • 2
  • 2
5 Comments
 
LVL 6

Expert Comment

by:DoppyNL
ID: 9641475
put a table (or div-block) around all those tables and assign the border you want to that.
0
 
LVL 31

Accepted Solution

by:
seanpowell earned 40 total points
ID: 9641547
I would simplify your structure with CSS, and use a div for your border. I'm not sure what you're doing with the peq style, but you can incorporate it easily enough...


<html>
<head>
<title>Table Border</title>
<style type="text/css">
<!--
table      { width:100%; }
td.peq     { background-color:#000000; text-align:center; width:20%; }
td.heading { color:#EEEEEE; text-align:center; width:100%; }
//-->
</style>
</head>
<body>
<div style="border: 1px solid #FF0000;">
<table cellspacing="0" cellpadding="0" border="0" bordercolor="gray">
<tr>
<td class="heading">Main Heading</td>
</tr>
</table>
<table cellspacing="0" cellpadding="0" border="1" bordercolor="gray">
<tr>
<td class="heading">sub heading</td>
</tr>
</table>
<table cellspacing="0" cellpadding="1" border="0">
<tr>
<td valign=top class="peq"><a href="http://web-site.com/">link text</a></td>
<td valign=top class="peq"><a href="http://web-site.com/">link text</a></td>
<td valign=top class="peq"><a href="http://web-site.com/">link text</a></td>
<td valign=top class="peq"><a href="http://web-site.com/">link text</a></td>
<td valign=top class="peq"><a href="http://web-site.com/">link text</a></td>
</tr>
</table>
<table cellspacing="0" cellpadding="1" border="0">
<tr>
<td valign=top class="peq"><a href="http://web-site.com/">link text</a></td>
<td valign=top class="peq"><a href="http://web-site.com/">link text</a></td>
<td valign=top class="peq"><a href="http://web-site.com/">link text</a></td>
<td valign=top class="peq"><a href="http://web-site.com/">link text</a></td>
<td valign=top class="peq"><a href="http://web-site.com/">link text</a></td>
</tr>
</table>
<table cellspacing="0" cellpadding="1" border="0">
<tr>
<td valign=top class="peq"><a href="http://web-site.com/">link text</a></td>
<td valign=top class="peq"><a href="http://web-site.com/">link text</a></td>
<td valign=top class="peq"><a href="http://web-site.com/">link text</a></td>
<td valign=top class="peq"><a href="http://web-site.com/">link text</a></td>
<td valign=top class="peq"><a href="http://web-site.com/">link text</a></td>
</tr>
</table>
<table cellspacing="0" cellpadding="1" border="0">
<tr>
<td valign=top class="peq"><a href="http://web-site.com/">link text</a></td>
<td valign=top class="peq"><a href="http://web-site.com/">link text</a></td>
<td valign=top class="peq"><a href="http://web-site.com/">link text</a></td>
<td valign=top class="peq"><a href="http://web-site.com/">link text</a></td>
<td valign=top class="peq"><a href="http://web-site.com/">link text</a></td>
</tr>
</table>
</div>
</body>
</html>
0
 
LVL 1

Author Comment

by:sanctify
ID: 9641959
woooho you rock !!!!!!!!!!!!!!!!!!!

the peq is test styling by the way.

i am kinda new to html ...so its slow going ...took long time to get that as it was LOL

THANKS !!!!!!!!!!!!!!!!!!!!!!
0
 
LVL 1

Author Comment

by:sanctify
ID: 9641980
test=text ... typo =]
0
 
LVL 31

Expert Comment

by:seanpowell
ID: 9641983
No problem - and best of luck!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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
Help to align the buttons in a row 2 43
Html test in IIS 4 22
CSS: How do I override in-line styling 11 24
SSRS 2016 Rendering HTML tables 3 26
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
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.
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.…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

809 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