View Full Version : tiny little border lines
whackaxe
08-12-2002, 11:28 AM
can someone tell me how to make those verrryyyy tiny little border lines (like the onees on this forum) in CSS? i have tried
.main
{
border-width: 1px;
border-style: solid;
border-color: white;
}
where .main is used in a table but the lines still seem thicker than what i was hoping can someone tell me if this is posible or if im blind?
x_goose_x
08-12-2002, 01:40 PM
Can't get any smaller than 1 pixel. On the table tag is there border=" if so either set it to 0 or delete it.
webmarkart
08-12-2002, 03:24 PM
although this is perhaps an older way of doing it, it still works for me...
<TABLE WIDTH="760" CELLPADDING="1" CELLSPACING="0" BORDER="0" BGCOLOR="#000000">
<TR>
<TD WIDTH="760">
<TABLE WIDTH="760" CELLPADDING="1" CELLSPACING="0" BORDER="0" BGCOLOR="#FFFFFF">
<TR>
<TD>BODY</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
that will put a black border around the whole outsite of the table. If you want the black border to be inbetween the tds (like in this forum) chance the inner table's cellspacing to 1.
Check out http://www.codingforums.com/showthread.php?s=&threadid=3834
meerkat
08-12-2002, 03:30 PM
whac…
I was thinking. I notice your border is 'white'. If this is on a dark (black, deep blue etc) and you're using white as your border colour then its going to be pretty contrasty.
What I'm suggesting is this (not in your scenario but…). If you use a dark grey border instead of Black it will be less contrasty and if it's 1px (which apparently is the smallest division one can get on a screen) then being fainter it will APPEAR to be slimmer!
Just a thought…
meerkat:cool:
pardicity3
08-12-2002, 04:54 PM
I've noticed many a times that when you use the border-width: 1px; it is bigger than if you use the overlapping table method. I have no idea why this is.....I have sought for answers but never come up with any. The best thing I can recommend is to play around with webmarkart's code and see if you like that method better...I do!
webmarkart
08-12-2002, 05:07 PM
to answer pardicity3's question: when you say border="1" in a table there are essentially 3 parts to that type of border. The normal border and a highlight and a lowlight color. To see this clearly check out what this looks like... you will easily see the different colors within that "1" pixel border.
<body bgcolor="red">
<TABLE WIDTH="500" BORDER="10">
<tr>
<td>dfgsdtgsterwttwetet</td>
</tr>
</TABLE>
So a border of one in a table like this:
<table border="1"> is really more than pixel
when you use nested tables the way I listed above it is truely 1 pixel.
Morgoth
08-13-2002, 12:56 PM
Is this the style you wanted?
<table bgcolor="#ffffff" width="125" style="border: 1px solid #000000;">
<tr>
<td>
TEST WORDS
</td>
</tr>
</table>
Originally posted by meerkat
I was thinking. I notice your border is 'white'. If this is on a dark (black, deep blue etc) and you're using white as your border colour then its going to be pretty contrasty.
What about a white background with a white border, but the table cells all have a black bg? It looks nice and stylish!
Example(oppisite):
<html>
<head><title>Hello World</title></head>
<body bgcolor="#000000">
<table width="125" cellpadding="0" cellspacing="1" border="0" bgcolor='#000000'>
<tr>
<td>
<table bgcolor="#000000" width="100%" cellpadding="2" cellspacing="1" border="0">
<tr>
<td width="200" height="150" bgcolor="#ffffff"></td>
<td width="200" height="150" bgcolor="#ffffff"></td>
</tr>
<tr>
<td width="200" height="150" bgcolor="#ffffff"></td>
<td width="200" height="150" bgcolor="#ffffff"></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
whackaxe
08-13-2002, 06:20 PM
great ideas for slimming down here! cheers. maybe i we should send them to slim fast and have them added as a "secret ingredient" :thumbsup: :D
skorn
08-13-2002, 08:21 PM
well, i do it the hard way. but its the best result i get. i can bet it can be to all of you. here it is:
<table>
<tr>
<td width="1" height="1" bgcolor="#000000"><td>
<td height="1" bgcolor="#000000"></td>
<td width="1" height="1" bgcolor="#000000"><td>
</tr>
<tr>
<td width="1" bgcolor="#000000"><td>
<td>blah blah blah</td>
<td width="1" bgcolor="#000000"><td>
</tr>
<tr>
<td width="1" height="1" bgcolor="#000000"><td>
<td height="1" bgcolor="#000000"></td>
<td width="1" height="1" bgcolor="#000000"><td>
</tr>
</table>
actually, u creating color for the cell (<td>). do not set any border color to the table. plus, in every cell (<td></td>) you create the line, do not allow any (space) in that cell. you need to play around to get the effect you need. see demo at: http://www.mobileirc.net - at the frontpage + other pages. wokring on that pages currently.
love, sex, compute
Morgoth
08-14-2002, 10:36 AM
Originally posted by skorn
<table>
<tr>
<td width="1" height="1" bgcolor="#000000"><td>
<td height="1" bgcolor="#000000"></td>
<td width="1" height="1" bgcolor="#000000"><td>
</tr>
<tr>
<td width="1" bgcolor="#000000"><td>
<td>blah blah blah</td>
<td width="1" bgcolor="#000000"><td>
</tr>
<tr>
<td width="1" height="1" bgcolor="#000000"><td>
<td height="1" bgcolor="#000000"></td>
<td width="1" height="1" bgcolor="#000000"><td>
</tr>
</table>
Skorn, always test out your code before usage. Don't forget to end your tags ("</td>").
BTW, I think this is something of what you wanted to type in.
<table cellpadding="0" cellspacing="0" border="0" width="100" height="40">
<tr>
<td colspan="3" height="1" bgcolor="#000000" width="100"></td>
</tr>
<tr>
<td width="1" bgcolor="#000000"></td>
<td width="98"></td>
<td width="1" bgcolor="#000000"></td>
</tr>
<tr>
<td colspan="3" height="1" bgcolor="#000000" width="100"></td>
</tr>
</table>
skorn
08-14-2002, 08:46 PM
i forgot the slash. (again) thanks morgoth. btw, u can just ignore the width of your main contents e.g. width="98" or width="65%". the browser will automatically fill it up.
n can somebody let me know y i cant use width="*" no more. i get keep on getting message saying 'not a valid value.' btw, i made my design in mm dreamweaver mx. is it because the mx version. i totally got no prob prior to version 4.
c'mon. i see the bulb is light on ur head. answer me.....
love, sex, compute
Morgoth
08-15-2002, 07:41 AM
Everyone has their own methods.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.