SitePoint Sponsor

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 25 of 28
  1. #1
    applying the spf lotion V + E + R + T's Avatar
    Join Date
    Apr 2001
    Location
    USA
    Posts
    306
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Adding a 1 pixel border to a table?

    Is there a way to add a 1 pixel border to a table? Very much like the table at: http://www.frogdesign.com/framesets/iframes_html.html. I would be happy if someone could give me the code for this. Thanks!
    Proud SPF member since 2001!

  2. #2
    Next stop: PHP! Marina's Avatar
    Join Date
    Apr 2001
    Location
    Sweden
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nest a table inside another table like so:

    <table width="100" border="0" cellspacing="0" cellpadding="1px" bgcolor="black" >
    <tr>
    <td>
    <table width="100%" border="0" cellspacing="0" cellpadding="2" bgcolor="white" >
    <tr>
    <td>&nbsp;</td>
    </tr>
    </table>
    </td>
    </tr>
    </table>

    If you are using Dreamweaver there is a good extension that will do this for you. You can download it here.

  3. #3
    SitePoint Wizard dominique's Avatar
    Join Date
    Dec 2000
    Location
    orbis terrarum
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    From what I can tell by looking at the page's code is that the border does not belong to the table, but to the iframe. This is the page's code, note the style attribute (in bue) in the first iframe:
    Code:
    <BODY background="" bgColor=#f0f0f0 bottomMargin=0 leftMargin=0 topMargin=0 marginwidth="0">
    <TABLE border=0 cellPadding=0 cellSpacing=0 height="98%" width="100%">
      <TBODY>
      <TR height="100%" vAlign=center>
        <TD align=middle><IFRAME frameBorder=0 height=320 name=topframe 
          scrolling=no src="maintop.html" style="BORDER-BOTTOM: #adadad 1px solid; BORDER-LEFT: 
          #adadad 1px solid; BORDER-RIGHT: #adadad 1px solid; BORDER-TOP: #adadad 1px solid" 
          width=762></IFRAME><BR>
          <!-- 		 -->
          <IFRAME frameBorder=0 height=200 name=bottomframe scrolling=no src="html_directory.html" 
          width=762></IFRAME>
        </TD>
       </TR>
       </TBODY>
    </TABLE>
    </BODY>
    The table contains an iframe with a 1 pixel border. The table itself actually has no border (in red).

  4. #4
    SitePoint Wizard dominique's Avatar
    Join Date
    Dec 2000
    Location
    orbis terrarum
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No way! You beat me by a couple of seconds!

  5. #5
    Next stop: PHP! Marina's Avatar
    Join Date
    Apr 2001
    Location
    Sweden
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm fast! I wish that I could understand the tbody and iframe tags, though. Netscape doesn't recogninze the first one, or...?
    (I have read about what tbody does but still don't understand why I should use it.)

  6. #6
    SitePoint Wizard dominique's Avatar
    Join Date
    Dec 2000
    Location
    orbis terrarum
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    iframe and tbody are not recognized by NS 4x.

    iframe stands for inline frame if I'm not mistaken. Basically it's like a frame within your page. It allows you to display a second web page within the first, think of it as a page within a page. I hope that makes sense.

    tbody is a pretty much useless tag as far as the finished product is concerned. A surfer will never see the difference between a page that uses tbody and a page that doesn't, because it doesn't change the layout. It has the same effect as the comment tag, you can't see it on the page.

    There was a short discussion in this thread about tbody. From what I understand, tbody is an organization tool that can be quite helpful.

  7. #7
    Next stop: PHP! Marina's Avatar
    Join Date
    Apr 2001
    Location
    Sweden
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for explaining, dominique! I'll have to try using iframe, sounds interesting.

  8. #8
    PHP Developer W1LL's Avatar
    Join Date
    Apr 2001
    Location
    Leicester, UK
    Posts
    459
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    <table width="100%" style="border: 1px solid #FF0000;">
      <tr>
        <td>
          <p>There you have it!</p>
        </td>
      </tr>
    </table>
    The shortest solution I think

    - Will

  9. #9
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by W1LL
    Code:
    <table width="100%" style="border: 1px solid #FF0000;">
      <tr>
        <td>
          <p>There you have it!</p>
        </td>
      </tr>
    </table>
    The shortest solution I think

    - Will
    This will not work in Netscape.

    Sean

  10. #10
    SitePoint Addict superbird's Avatar
    Join Date
    Aug 2000
    Location
    Swansea, UK
    Posts
    260
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The only thing I've found to work in Netscape is having the borders as actual table cells with a bgcolor and a 1px spacer gif in them. The damn code is on my PC at work though so I can't post it! (might have the energy to write it again later, lol)
    ...KartLink...

  11. #11
    applying the spf lotion V + E + R + T's Avatar
    Join Date
    Apr 2001
    Location
    USA
    Posts
    306
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow, thanks for the input. The link didn't work (probably because it has your session on it). So, I'll go looking for the plugin. Anyways, I was basically looking for the code that was compatible with Netscape and IE. Sorry I didn't mention that in the 1st post.

    Superbird: I'll be thanking you if you could supply me with that code. Thanks in advance!
    Last edited by V + E + R + T; Jun 9, 2001 at 13:52.
    Proud SPF member since 2001!

  12. #12
    SitePoint Enthusiast
    Join Date
    Mar 2001
    Location
    San Jose, California
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How about this. Works for me & Netscape.

    <table cellpadding="0" cellspacing="0" border="0" bgcolor="#000000" width="150" align="center">
    <tr>
    <td><table cellpadding="0" cellspacing="1" border="0" width="100%">
    <tr>
    <td bgcolor="#ffffff">contents</td>
    </tr>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>

    This may be a bit on the sloppy side (food burning on stove) but will work with a spacer gif.

    <TABLE BORDER=0 WIDTH="150" CELLPADDING=0 CELLSPACING=0>
    <TR>
    <TD ALIGN=CENTER colspan="3" bgcolor="#000000"><img src="spacer.gif" width="150" height="1"></TD>
    </TR>
    <TR>
    <TD ALIGN=CENTER bgcolor="#000000"><img src="spacer.gif" width="1" height="100%"></TD>
    <TD ALIGN=CENTER width="148">contents</TD>
    <TD ALIGN=CENTER bgcolor="#000000"><img src="spacer.gif" width="1" height="100%"></TD>
    </TR>
    <TR>
    <TD ALIGN=CENTER colspan="3" bgcolor="#000000"><img src="spacer.gif" width="150" height="1"></TD>
    </TR>
    </TABLE>

    judge
    Last edited by the judge; Jun 9, 2001 at 17:54.

  13. #13
    SitePoint Addict superbird's Avatar
    Join Date
    Aug 2000
    Location
    Swansea, UK
    Posts
    260
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the judge, your top code doesn't work in Netscape because that's what I did on http://www.tvkc.co.uk which doesn't, however your bottom one works in everything AFAIK
    ...KartLink...

  14. #14
    SitePoint Member Craig Armstrong's Avatar
    Join Date
    Jun 2001
    Location
    Vancouver, WA, USA
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    <table cellspacing="0" cellpadding="0" border="0">
      <tr>
        <td bgcolor="#000000">
          <table cellspacing="1" cellpadding="2" border="0">
            <tr>
              <td bgcolor="#FFFFFF">
    
                 Content in Here.
    
              </td>
            </tr>
          </table>
        </td>
      </tr>
    </table>
    --Craig Armstrong

    My site: coldplayonline.com
    Homepage: obscured.reflections

  15. #15
    SitePoint Addict superbird's Avatar
    Join Date
    Aug 2000
    Location
    Swansea, UK
    Posts
    260
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Craig, I've found on numerous occasions that that code doesn't work in Netscape, is it just me? Can someone look at http://www.tvkc.co.uk and tell me if that has 1px borders because that is what I did there and it sure as hell doesn't have them when I look at it in Netscape!
    ...KartLink...

  16. #16
    applying the spf lotion V + E + R + T's Avatar
    Join Date
    Apr 2001
    Location
    USA
    Posts
    306
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Craig Armstrong
    Code:
    <table cellspacing="0" cellpadding="0" border="0">
      <tr>
        <td bgcolor="#000000">
          <table cellspacing="1" cellpadding="2" border="0">
            <tr>
              <td bgcolor="#FFFFFF">
    
                 Content in Here.
    
              </td>
            </tr>
          </table>
        </td>
      </tr>
    </table>
    This code works perfectly on my Netscape browser (and IE). I don't know about you, superbird.

  17. #17
    SitePoint Enthusiast
    Join Date
    Mar 2001
    Location
    San Jose, California
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    superbird,

    That top code of mine shows up on Netscape 4.0 for me???
    I looked at your page and no the borders don't show with Net but do with IE.

    judge

  18. #18
    SitePoint Addict superbird's Avatar
    Join Date
    Aug 2000
    Location
    Swansea, UK
    Posts
    260
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well I just want to know how in the name of $%^ you lot can get your 1px borders that use the variations of the cellpadding trick to work Oh well, nevermind.
    ...KartLink...

  19. #19
    SitePoint Wizard dominique's Avatar
    Join Date
    Dec 2000
    Location
    orbis terrarum
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by V + E + R + T
    The link didn't work (probably because it has your session on it).
    V + E + R + T, the tbody link should work, it is not dependent on my session.

  20. #20
    Next stop: PHP! Marina's Avatar
    Join Date
    Apr 2001
    Location
    Sweden
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think that it was my link that wasn't working. The extension I was talking about can be downloaded at www.macromedia.com/exchange/dreamweaver/
    In the dropdown menu chose "tables".

  21. #21
    SitePoint Wizard dominique's Avatar
    Join Date
    Dec 2000
    Location
    orbis terrarum
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Marina
    I think that it was my link that wasn't working.
    Oh.

  22. #22
    VICTORY IS MINE! luchazard's Avatar
    Join Date
    May 2001
    Location
    USA
    Posts
    229
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Marina
    I think that it was my link that wasn't working. The extension I was talking about can be downloaded at www.macromedia.com/exchange/dreamweaver/
    In the dropdown menu chose "tables".
    What is the title of it? That search produced a few results... is it 'nested table border color trick'??

  23. #23
    Next stop: PHP! Marina's Avatar
    Join Date
    Apr 2001
    Location
    Sweden
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, that's the one!

  24. #24
    VICTORY IS MINE! luchazard's Avatar
    Join Date
    May 2001
    Location
    USA
    Posts
    229
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank! btw is there a reason it isn't Macromedia approved??

  25. #25
    Next stop: PHP! Marina's Avatar
    Join Date
    Apr 2001
    Location
    Sweden
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't know. Maybe it just hasn't been tested yet. Here is an explanation of the different stages of approval:

    About Extension Testing and Approval

    Quality assurance tests are performed on all extensions submitted to the Macromedia Exchange. These tests do not represent full functionality testing, but are geared towards quality control. Testing and full verification of extension functionality should always be performed independently by each developer before uploading to the Macromedia Exchange.

    Basic Approval
    Each Extension on the site has undergone a series of basic tests to make sure that it installs correctly with Dreamweaver. Macromedia Approved Extensions have passed more rigorous testing.

    Macromedia Approved
    Extensions that have the Macromedia Approved icon have been tested to make sure they behave in a way familiar to Dreamweaver users. Developers who intend to submit extensions for Macromedia Approval should first perform this test plan on their extensions to verify compliancy before uploading to the Macromedia Exchange.


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
  •