Click to See Complete Forum and Search --> : HTML table : a 1 pixel border......is it so hard?


Xeon
April 28th, 2003, 02:48 AM
Now, below is my HTML code to create a simple table with 2 columns and several rows :

<HTML>
<BODY>
<TABLE border = 1 cellspacing="0" cellpadding="3" border="0">

<tr style="border-width: 1px; border-color: black">
<td><b>Name</b></td>
<td><b>Notes</b></td>
</tr>

<tr style="background-color: #FFCC66">
<td>Abraham Lincoln</td>
<td>Honest Abe : The Best</td>
</tr>

<tr>
<td>Franklin D' Roosevelt</td>
<td>Did a lot for America</td>
</tr>

<tr>
<td>George Washington</td>
<td>The Father of all Presidents</td>
</tr>

<tr>
<td>Ronald Reagan</td>
<td>A nice President for America</td>
</tr>

<tr>
<td>Jimmy Carter</td>
<td>Peace-loving man. Won the Nobel Peace Award.</td>
</tr>

<tr>
<td>George W. Bush</td>
<td>Err....for him...I've no comments.</td>
</tr>

</TABLE>
</BODY>
</HTML>


What I'm trying to achieve is to give the table a thin and flat 1 pixel border with no raised or sunken effects : just a thin, 1 pixel flat border.

I've attached a screenshot to this thread to show the difference between the current table style and the kinda border I want.

Hope you can help, and thanks a lot! :):):)
Xeon.

Xeon
April 28th, 2003, 02:49 AM
Oh, here's the screenshot.

antares686
April 28th, 2003, 06:06 AM
Here is the way most folks use so can be done with style sheets.


<HTML>
<BODY>

<STYLE>
X {border: 1pt solid #000000; border-Collapse: collapse}
Z {border: 1pt solid #000000}
.ORNG {background-color: #FFCC66}
</STYLE>

<TABLE>

<tr>
<td><b>Name</b></td>
<td><b>Notes</b></td>
</tr>

<tr CLASS=ORNG>
<td>Abraham Lincoln</td>
<td>Honest Abe : The Best</td>
</tr>

<tr>
<td>Franklin D' Roosevelt</td>
<td>Did a lot for America</td>
</tr>

<tr>
<td>George Washington</td>
<td>The Father of all Presidents</td>
</tr>

<tr>
<td>Ronald Reagan</td>
<td>A nice President for America</td>
</tr>

<tr>
<td>Jimmy Carter</td>
<td>Peace-loving man. Won the Nobel Peace Award.</td>
</tr>

<tr>
<td>George W. Bush</td>
<td>Err....for him...I've no comments.</td>
</tr>

</TABLE>
</BODY>
</HTML>

Xeon
April 28th, 2003, 09:48 AM
Thanks a lot, antares686!
On the other and, is there no other way other than style sheets?

Thanks! :):):)
Xeon.

Satishpp
April 28th, 2003, 12:50 PM
I dont think there is any way to do this in plain HTML. You could however use the style information inline, as you have done in your code

***********

<table border=1 cellpadding=3 cellspacing=0 style="border: 1pt solid #000000; border-Collapse: collapse">

<tr>
<td style="border: 1pt solid #000000">1</td>
<td style="border: 1pt solid #000000">asdf</td>
</tr>

************

Satish

Xeon
April 28th, 2003, 08:51 PM
Thanks a lot, Satishpp!!! :):):):):)