| | |
Table border
Please support our HTML and CSS advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Jun 2006
Posts: 67
Reputation:
Solved Threads: 0
HTML and CSS Syntax (Toggle Plain Text)
<table width="492" border="0" bordercolor="#202020" align="left" cellpadding="7" RULES=ROWS FRAME=HSIDES>
I have created a table with four rows and I use the code above to take away the vertical borders.
What I would like to do is to take away 2nd (out of 3 rows) row. How can I do this? Do I need to use CSS?
Thanks.
0
#6 Oct 9th, 2009
If you're generating the HMTL code yourself, add a class to the rows you want to style without borders.
E.G. HTML
and style the CSS accordingly.
E.G. HTML
HTML and CSS Syntax (Toggle Plain Text)
<table width="492" border="0" bordercolor="#202020" align="left" cellpadding="7" RULES=ROWS FRAME=HSIDES><tbody> <tr><td>1st row</td></tr> <tr class="noborders"><td>2nd row</td></tr> <tr><td>1st row</td></tr> <tr class="noborders"><td>2nd row</td></tr> </tbody></table>
and style the CSS accordingly.
HTML and CSS Syntax (Toggle Plain Text)
.noborders td {border:0;}
Last edited by urolicious; Oct 9th, 2009 at 10:11 am.
•
•
Join Date: Oct 2009
Posts: 2
Reputation:
Solved Threads: 1
0
#8 Oct 10th, 2009
You can even use border attributes for specific cells and colspan for merging the cells.
http://asktheexpert-techsupport.blogspot.com/
http://asktheexpert-techsupport.blogspot.com/
0
#9 Oct 10th, 2009
There's a problem with using "rules" to control a table's appearance - namely that the HTML specification doesn't specify what the appearance should be and each browser renders differently.
Depending on the visual effect you are after, you might be lucky and get an acceptable appearance in all borwsers but many people choose not to use table rules. It's generally safer (appearance-wise) to use a purely CSS solution for this sort of thing.
Here is a solution (certainly not the only one):
Note that the very last table row does not need
Airshow
Depending on the visual effect you are after, you might be lucky and get an acceptable appearance in all borwsers but many people choose not to use table rules. It's generally safer (appearance-wise) to use a purely CSS solution for this sort of thing.
Here is a solution (certainly not the only one):
css Syntax (Toggle Plain Text)
table.myTable { border : 1px solid #999999; } table.myTable td { background-color: #F4F4F4; border : 0px solid #999999; } table.myTable tr.underline td { border-bottom-width : 1px; }
HTML Syntax (Toggle Plain Text)
<table class="myTable" border="0" cellpadding="5" cellspacing="0"> <tr><td>aaa</td><td>aaa</td><td>aaa</td></tr> <tr><td>bbb</td><td>bbb</td><td>bbb</td></tr> <tr class="underline"><td>ccc</td><td>ccc</td><td>ccc</td></tr> <tr><td>ddd</td><td>ddd</td><td>ddd</td></tr> <tr><td>eee</td><td>eee</td><td>eee</td></tr> <tr class="underline"><td>fff</td><td>fff</td><td>fff</td></tr> <tr><td>ggg</td><td>ggg</td><td>ggg</td></tr> <tr class="underline"><td>hhh</td><td>hhh</td><td>hhh</td></tr> <tr class="underline"><td>iii</td><td>iii</td><td>iii</td></tr> <tr><td>jjj</td><td>jjj</td><td>jjj</td></tr> <tr><td>kkk</td><td>kkk</td><td>kkk</td></tr> <tr><td>lll</td><td>lll</td><td>lll</td></tr> </table>
class="underline" as it is hard against the bottom edge of the table.Airshow
50% of the solution lies in accurately describing the problem!
0
#10 Oct 10th, 2009
im sorry.. you should collapse the table borders before any border property will work in css. so this is the css code you should have:
HTML and CSS Syntax (Toggle Plain Text)
table {border-collapse: collapse;} td {border:1px solid #000;} .noborder td {border:0;}
![]() |
Similar Threads
- Dreamweaver MX - unwanted white table space at top (Graphics and Multimedia)
- display table border (PHP)
- Table css border help (HTML and CSS)
- CSS -- table border and table header color (HTML and CSS)
- Print 5 records per table row (see script) (Perl)
- html table to .csv (HTML and CSS)
Other Threads in the HTML and CSS Forum
- Previous Thread: .htaccess redirect, and an anchor link
- Next Thread: mobile complaint website
| Thread Tools | Search this Thread |
appointments asp background backgroundcolor beta browser bug calendar cart cgi code codeinjection corporateidentity css design development displayimageinsteadofflash dreamweaver emailmarketing epilepsy explorer firefox flash form format google griefers hackers hitcounter hover html ide ie7 ie8 iframe image images internet internetexplorer intranet iphone javascript jpeg layout macbook maps marketshare microsoft mozilla multimedia navigationbars news offshoreoutsourcingcompany opacity opera optimization perl pnginie6 positioning problem scroll seo shopping studio swf swf. textcolor timecolor titletags url urlseparatedwords visual visualization web webdevelopment webform website windows7 xml xsl






