Table & Cell borders and spacing

  • Thread starter Thread starter Niagara Mouse
  • Start date Start date
N

Niagara Mouse

Starting a new website I have created one page with a table that is 9 columns
and 5 rows. I am experiencing two problems:

1. Page and table background is a medium colour. I have selected 0 for
border size and color 'nothing' and selected collapse table border. Then I
changed the colour of some rows to a lighter colour but the background now
shows through each column and row and looks like a border around the cells,
how do I get rid of the spaces to eliminate that border look.

2. Cannot make a row smaller than 8pt. I want a long thin row with a
contrasting colour to act as an underline but the row needs to be 6 px in
height, it will not change to that height. I tried inserting a horizontal
line but then the row gets bigger to accommodate the line plus the 8pt (I
know it is 8pt because I can put 8pt text into it.

Thanks in advance
 
Problem 1)
Need to see the page, or at least the HTML markup and all relevant CSS, but
setting cellspacing to 0 may help.
<table cellspacing="0">

Problem 2)
In the <table> tag, make sure that cellpadding and cellspacing are set to
zero.
Insert a transparent .gif image in the cell that is set to the height you
need - for example:

<tr><td colspan="9"><img src="images/tp.gif" height="6" width="2"
alt=""></td></tr>

( tp.gif is the name of the transparent image)

You must have everything on the same line, with no spaces between the html
elements, otherwise the spaces or new line character will affect the height
of the cell, and thus the row.

If you cannot make one yourself, a transparent .gif is available from
http://www.rxs-enterprises.org/images/tp.zip
(the .zip file also contains a cyan image, useful for testing).
 
Thanks Ronx, the cell spacing with the problem with the border-like lines
around cells. Thanks for the great idea of the transparent gif, I will use
it. I actually created a gif of the color that I wanted and placed it into
the row but it was smaller on my screen then what the row is supposed to be
(even though I created it the same size) so I will try the transparent gif
over the color I want in the row that was everything will match width-wise.
 
Your coloured image should work. This is one image that can be resized
using HTML, since being a solid colour it should be small (bytes) and
resizing will not distort anything. Make sure that there are NO spaces
between each HTML element

<td><img .. Not <td> <img ..

and <img ... ></td> NOT <img ... > </td>

And, <td> and </td> MUST be on the same line in Code View.
 
Back
Top