Results 1 to 3 of 3
10-16-2003, 11:34 AM #1
Favorite methods for creating 1px borders
I'm doing an informal survey on how everyone handles 1 px borders for tables. I'm particularly interested in borders within tables, esp. those that "float" between cells. Here's various methods I've used and seen:
- A table with a bgcolor and white cells inside of it.
- For, say a vertical border btween cells, a separate cell with its own bgcolor sitting between the 2 cells.
- Using a colored HR with the noshade tag
- A table directly within a table, the outside table with bordercolor white and the inside with the bordercolor of choice. Yahoo seems to do this a lot, even though it starts off with lots of tables.
<TABLE cellSpacing=1 cellPadding=1 width=500 align=center
<TABLE cellSpacing=4 cellPadding=6 width="100%"
- Any other ideas???
This isn't really about browser compatibility, but that's a factor as well. I'm more interested in the scope of solutions and why people choose what method they choose
10-16-2003, 06:08 PM #2
Without a doubt CSS should be considered. I just got home from a job and have to get back to work changing AHFB to XHTML, but a great example of what I am doing can be found in the php scripts section.
Last edited by HTML; 03-23-2009 at 04:23 PM.
10-17-2003, 12:09 AM #3
How about nested divs.
One div with a margin of 1px inside another div that has a different background colour.
Or, rather than a margin of 1px on the inner div, you could have a padding of 1px on the outer div.
Maybe I've got it backwards? I've done it. You can create borders of repeated images that way by using an image as the background of the outer div as well, instead of the regular solid or ridged, etc. kind of borders. Makes for interesting borders sometimes.