Table border

Thread Solved

Join Date: Jun 2006
Posts: 67
Reputation: ytregnn is an unknown quantity at this point 
Solved Threads: 0
ytregnn ytregnn is offline Offline
Junior Poster in Training

Table border

 
0
  #1
Oct 7th, 2009
HTML and CSS Syntax (Toggle Plain Text)
  1. <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.
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 1
Reputation: ikram ali is an unknown quantity at this point 
Solved Threads: 1
ikram ali ikram ali is offline Offline
Newbie Poster
 
0
  #2
Oct 7th, 2009
you want to do that 2nd row is enter the out of the third row then you can use this tag
<tr>

<tr>
please try to this tage if you can succse then please tellme
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 865
Reputation: Airshow will become famous soon enough Airshow will become famous soon enough 
Solved Threads: 123
Airshow's Avatar
Airshow Airshow is offline Offline
Practically a Posting Shark
 
0
  #3
Oct 7th, 2009
Ytregnn,

"take away"?

Best way is to serve the table without the row you don't want.

Airshow
50% of the solution lies in accurately describing the problem!
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 67
Reputation: ytregnn is an unknown quantity at this point 
Solved Threads: 0
ytregnn ytregnn is offline Offline
Junior Poster in Training
 
0
  #4
Oct 9th, 2009
Airshow: I do want the rows/borders, but I don't want every 2nd border to be visible.

Ex:
_______
_______
_______
_______
_______

Ex 2:
_______

_______

_______
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 318
Reputation: Thirusha is an unknown quantity at this point 
Solved Threads: 51
Thirusha's Avatar
Thirusha Thirusha is offline Offline
Posting Whiz
 
0
  #5
Oct 9th, 2009
Try using the colspan parameter, this merges the columns.
Life... Is a Moment
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 13
Reputation: urolicious is an unknown quantity at this point 
Solved Threads: 2
urolicious's Avatar
urolicious urolicious is offline Offline
Newbie Poster
 
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
HTML and CSS Syntax (Toggle Plain Text)
  1. <table width="492" border="0" bordercolor="#202020" align="left" cellpadding="7" RULES=ROWS FRAME=HSIDES><tbody>
  2. <tr><td>1st row</td></tr>
  3. <tr class="noborders"><td>2nd row</td></tr>
  4. <tr><td>1st row</td></tr>
  5. <tr class="noborders"><td>2nd row</td></tr>
  6. </tbody></table>

and style the CSS accordingly.
HTML and CSS Syntax (Toggle Plain Text)
  1. .noborders td {border:0;}
Last edited by urolicious; Oct 9th, 2009 at 10:11 am.
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 67
Reputation: ytregnn is an unknown quantity at this point 
Solved Threads: 0
ytregnn ytregnn is offline Offline
Junior Poster in Training
 
0
  #7
Oct 10th, 2009
urolicious:

I can see that the example you've created works, but somehow it doesn't work when I try to implement it in my own code.

Don't really know where it's all going wrong.
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 2
Reputation: testndtv is an unknown quantity at this point 
Solved Threads: 1
testndtv testndtv is offline Offline
Newbie Poster
 
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/
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 865
Reputation: Airshow will become famous soon enough Airshow will become famous soon enough 
Solved Threads: 123
Airshow's Avatar
Airshow Airshow is offline Offline
Practically a Posting Shark
 
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):

  1. table.myTable {
  2. border : 1px solid #999999;
  3. }
  4.  
  5. table.myTable td {
  6. background-color: #F4F4F4;
  7. border : 0px solid #999999;
  8. }
  9.  
  10. table.myTable tr.underline td {
  11. border-bottom-width : 1px;
  12. }
  1. <table class="myTable" border="0" cellpadding="5" cellspacing="0">
  2. <tr><td>aaa</td><td>aaa</td><td>aaa</td></tr>
  3. <tr><td>bbb</td><td>bbb</td><td>bbb</td></tr>
  4. <tr class="underline"><td>ccc</td><td>ccc</td><td>ccc</td></tr>
  5.  
  6. <tr><td>ddd</td><td>ddd</td><td>ddd</td></tr>
  7. <tr><td>eee</td><td>eee</td><td>eee</td></tr>
  8. <tr class="underline"><td>fff</td><td>fff</td><td>fff</td></tr>
  9.  
  10. <tr><td>ggg</td><td>ggg</td><td>ggg</td></tr>
  11. <tr class="underline"><td>hhh</td><td>hhh</td><td>hhh</td></tr>
  12.  
  13. <tr class="underline"><td>iii</td><td>iii</td><td>iii</td></tr>
  14.  
  15. <tr><td>jjj</td><td>jjj</td><td>jjj</td></tr>
  16. <tr><td>kkk</td><td>kkk</td><td>kkk</td></tr>
  17. <tr><td>lll</td><td>lll</td><td>lll</td></tr>
  18. </table>
Note that the very last table row does not need class="underline" as it is hard against the bottom edge of the table.

Airshow
50% of the solution lies in accurately describing the problem!
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 13
Reputation: urolicious is an unknown quantity at this point 
Solved Threads: 2
urolicious's Avatar
urolicious urolicious is offline Offline
Newbie Poster
 
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)
  1. table {border-collapse: collapse;}
  2. td {border:1px solid #000;}
  3. .noborder td {border:0;}
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC