SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2003
    Location
    London, UK
    Posts
    76
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Table cell borders?

    I know this is a n00b question but can you put a border around a single table cell? Or can you only do a whole table?

    Here's an example of what i'm trying to achieve (normal table/html, no images involved coz i wanna be able to change all colours through CSS)


  2. #2
    SitePoint Guru
    Join Date
    Dec 1999
    Location
    Southampton, Hants, UK
    Posts
    672
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you can do this easily with CSS.

    to get the above effect, you prob need somethign along the lines of:

    HTML Code:
     <table>
     	<tr>
     	    <td style="width: 20px; background-color: #000">Menu</td>
     	    <td>&nbsp</td>
     	</tr>
     	<tr>
     	    <td colspan="2" style="border: 3px solid #000">
     	        blah
     	        blah  
     	        blah
     	   </td>
     	</tr>
     </table>
    Though in all honesty, I wouldn't be creating the above layout using tables. This would be incredibly simple entirly in CSS. Post in the CSS forum if u want to know more.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •