How to draw these borders

Reply

Join Date: Dec 2004
Posts: 234
Reputation: cancer10 is an unknown quantity at this point 
Solved Threads: 0
cancer10's Avatar
cancer10 cancer10 is offline Offline
Posting Whiz in Training

How to draw these borders

 
0
  #1
Mar 11th, 2008
I like the borders of the forums like this. Can someone tell me how to draw a border in HTML/CSS as shown in the screenshot.



http://img91.imageshack.us/img91/329...lloimn7.th.jpg

I would like to have the bordercolor as well. The following HTML does not work perfectly on all browsers

I mean, with

FF - The code works fine
IE - Works but displays a thicker border compared to FF
Opera - Does not show the border color



HTML and CSS Syntax (Toggle Plain Text)
  1. <table border=1 bordercolor="#6E94B7" cellspacing=0 cellpadding=0>
  2. <tr><td>Hello 1</td><td>Hello 2</td><td>Hello 3</td></tr>
  3. <tr><td>Hello 4</td><td>Hello 5</td><td>Hello 6</td></tr>
  4. <tr><td>Hello 7</td><td>Hello 8</td><td>Hello 9</td></tr>
  5. <tr><td>Hello 10</td><td>Hello 11</td><td>Hello 12</td></tr>
  6. </table>


Please help

Thanx
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 3,203
Reputation: MidiMagic has a spectacular aura about MidiMagic has a spectacular aura about 
Solved Threads: 165
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Nearly a Senior Poster

Re: How to draw these borders

 
0
  #2
Mar 11th, 2008
Originally Posted by cancer10 View Post
I like the borders of the forums like this. Can someone tell me how to draw a border in HTML/CSS as shown in the screenshot.

I would like to have the bordercolor as well. The following HTML does not work perfectly on all browsers

I mean, with

FF - The code works fine
IE - Works but displays a thicker border compared to FF
Opera - Does not show the border color

HTML and CSS Syntax (Toggle Plain Text)
  1. <table border=1 bordercolor="#6E94B7" cellspacing=0 cellpadding=0>
  2. <tr><td>Hello 1</td><td>Hello 2</td><td>Hello 3</td></tr>
  3. <tr><td>Hello 4</td><td>Hello 5</td><td>Hello 6</td></tr>
  4. <tr><td>Hello 7</td><td>Hello 8</td><td>Hello 9</td></tr>
  5. <tr><td>Hello 10</td><td>Hello 11</td><td>Hello 12</td></tr>
  6. </table>

Please help

Thanx
Use stylesheets instead of the deprecated border and bordercolor attributes of the table tag:

HTML and CSS Syntax (Toggle Plain Text)
  1. <html>
  2. <head>
  3. <title>My Title</title>
  4. <style type="text/css">
  5. .tablebord {border: 1px #6e94b7 solid; border-collapse: collapse;}
  6. </style>
  7. </head>
  8. <body>
  9.  
  10. <table class="tablebord">
  11. <tr><td>Hello 1</td><td>Hello 2</td><td>Hello 3</td></tr>
  12. <tr><td>Hello 4</td><td>Hello 5</td><td>Hello 6</td></tr>
  13. <tr><td>Hello 7</td><td>Hello 8</td><td>Hello 9</td></tr>
  14. <tr><td>Hello 10</td><td>Hello 11</td><td>Hello 12</td></tr>
  15. </table>
  16.  
  17. </body>
  18. </html>
Last edited by MidiMagic; Mar 11th, 2008 at 2:28 pm.
Daylight-saving time uses more gasoline
Reply With Quote Quick reply to this message  
Join Date: Nov 2003
Posts: 207
Reputation: rixius is an unknown quantity at this point 
Solved Threads: 1
rixius rixius is offline Offline
Posting Whiz in Training

Re: How to draw these borders

 
0
  #3
Mar 13th, 2008
You forgot to give him the css to use with that. : )

HTML and CSS Syntax (Toggle Plain Text)
  1. tablebord { border: 1px solid #6E94B7; }

I wouldn't use this, however, because it fails to put the borders between cells.

If you want to have a cross thatched border, set the background of the table element to the border color, and change the cellspacing to 1.

That should do it for you.
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 3,203
Reputation: MidiMagic has a spectacular aura about MidiMagic has a spectacular aura about 
Solved Threads: 165
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Nearly a Senior Poster

Re: How to draw these borders

 
0
  #4
Mar 15th, 2008
I forgot to put it in the td tags too. I was sleepy at the time.

HTML and CSS Syntax (Toggle Plain Text)
  1. <html>
  2. <head>
  3. <title>My Title</title>
  4. <style type="text/css">
  5. .tablebord {border: 1px #6e94b7 solid; border-collapse: collapse;}
  6. </style>
  7. </head>
  8. <body>
  9.  
  10. <table class="tablebord">
  11. <tr>
  12. <td class="tablebord">Hello 1</td>
  13. <td class="tablebord">Hello 2</td>
  14. <td class="tablebord">Hello 3</td>
  15. </tr>
  16. <tr>
  17. <td class="tablebord">Hello 4</td>
  18. <td class="tablebord">Hello 5</td>
  19. <td class="tablebord">Hello 6</td>
  20. </tr>
  21. <tr>
  22. <td class="tablebord">Hello 7</td>
  23. <td class="tablebord">Hello 8</td>
  24. <td class="tablebord">Hello 9</td>
  25. </tr>
  26. <tr>
  27. <td class="tablebord">Hello 10</td>
  28. <td class="tablebord">Hello 11</td>
  29. <td class="tablebord">Hello 12</td>
  30. </tr>
  31. </table>
  32.  
  33. </body>
  34. </html>
Daylight-saving time uses more gasoline
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
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