473,386 Members | 1,883 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

css table borders and spacing

I may be double posting here, but I think this is the more accurate
group to post this question.

I have a table in which I'm using css to set up the options of the
page, and I cannot get the spacing to do what I want.

In the following html page, I would like for the table with Sublink1,
2, and 3 to be directly against Link 3. Right now there is a gap of
about 5 pixels. I've simplified the page to only show my problem. I
would appreciate any suggestions on how to resolve this:

------------------ Inserted html -------------------------
<head>
<style>
body {
margin-top: 30px;
font-family: Arial, sans-serif;
}

table.tb_lb {
margin-left: 3px;
}

table.tb_internal_lb {
border-collapse: collapse;
margin-left: 3px;
}

td.lb_ml {
height: 21px;
width: 104px;
border: 1px black solid;
background: #D0D0D0;
padding-left: 5px;
font-weight: bold;
font-size: 14px;
}

td.lb_sl {
width: 86px;
border: 1px black solid;
background: #B0B0B0;
padding: 2px 0px 2px 15px;
font-weight: bold;
font-size: 12px;
}
</style>

</head>

<body>

<center>
<table class=tb_lb>
<tr><td class=lb_ml>Link 1</td></tr>
<tr><td class=lb_ml>Link 2</td></tr>
<tr><td class=lb_ml>Link 3
<tr><td>
<table class=tb_internal_lb>
<tr><td class=lb_sl>Sublink1</td></tr>
<tr><td class=lb_sl>Sublink2</td></tr>
<tr><td class=lb_sl>Sublink3</td></tr>
</table>
</td></tr>
<tr><td class=lb_ml>Link 4</td></tr>
<tr><td class=lb_ml>Link 5</td></tr>
<tr><td class=lb_ml>Link 6</td></tr>
</table>
</center>

</body>
</html>

May 11 '06 #1
2 1477
On Thu, 11 May 2006 06:01:05 +0200, <ke****@kemton.com> wrote:
In the following html page, I would like for the table with Sublink1,
2, and 3 to be directly against Link 3. Right now there is a gap of
about 5 pixels. I've simplified the page to only show my problem. I
would appreciate any suggestions on how to resolve this:
Don't use tables to do this. Use a list:
<URL:http://www.google.com/search?navigation+css+list>
------------------ Inserted html -------------------------
<head>
<style>


I assume in the real world you did put the opening tag for the html in the
page? And you ofcourse used a proper doctype declaration, like the one for
HTML 4.01 Strict?

In the future, please do not post (snippets of) code. Create a valid page
(both markup and css should be valid). Upload it to a server somewhere.
Post the URL to it in this newsgroup.

--
______PretLetters:
| weblog | http://www.pretletters.net/weblog/weblog.html |
| webontwerp | http://www.pretletters.net/html/webontwerp.html |
|zweefvliegen | http://www.pretletters.net/html/vliegen.html |
May 11 '06 #2
Your recommendation to use lists have worked perfectly.

May 11 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Rick DeBay | last post by:
I'm trying to create a layout table, where the spacing between rows varies. I've tried using setting margin-top and border-top for the rows I wan't spaced down from the one above, and I've also...
5
by: Aaron | last post by:
Hi, Is there a way to do table cellspacing with CSS? Thanks, Aaron
2
by: z | last post by:
Hi, i just wanted to know how i can resize a table using javascript but in this special manner: I have two tables, one at the top of the page and the other below that one. The problem is that in...
1
by: Andrew Poulos | last post by:
I'm trying to build a table using DOM methods with script that follows this type of format: // note the var bodyEl is predefined as the body element // var mytable =...
1
by: sam | last post by:
Hi, I want to use style on the grids of table. Currently it use default style of the html table, in which the grid size appeared very thick. How can I change the "thick" style of the default...
11
by: Michael Mayo | last post by:
I have a simple html page that contains an image in a single table cell, surrounded by a border: <http://www.softrains.com/lc/test.html>. I would like to eliminate the space between the table...
16
by: Barbara de Zoete | last post by:
Here's what I'm trying to do: Create a table with generic style property . Have a few table cells in the thead that 'have to' melt into eachother, so needing the style . Looking somthing...
3
by: Peter Kellner | last post by:
I've got my problem down to a very simple example that shows it. Basically, I have an html table in a header file, and an html in my body. Both have the same width, and the same number of columns....
10
by: phil-news-nospam | last post by:
I have a table with 3 columns in 1 row. I want to increase the spacing _between_ the columns (gutter) _without_ increasing the spacing between those columns and the table itself. Is there a way...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.