Simple table border size problem - someone must know this!


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Simple table border size problem - someone must know this!

  1. #1
    Ben Guest

    Simple table border size problem - someone must know this!


    Hi there,

    Working on a web page recently using bare html in Windows Notepad I discovered
    a problem with table borders that I have never encountered before. I do not
    know why it happens but it is pretty frustrating, maybe someone can give
    some info on why this is happening and what I can do to fix the problem.

    Well think of a basic table, with its border set to 1, but no cellpadding
    or cellspacing and just one td cell. The border of course is a fine line
    set at 1.

    But, when I put anything inside the table cell, just text, or perhaps another
    table inside the cell, anything at all it seems, well visually it changes
    the border thickness of the main table to a size of 2 even though I have
    it set at 1 in the html code.

    I was thinking if you have the table border set to 1 then putting something
    inside the td cell then that td cell now has a border of 1 as well so it
    could be combining with the border size of 1 around the outside border of
    the table which makes it look like 2? and because if you add more td cells
    then they have borders as well just because you set a border value in the
    main table tag. But maybe I am wrong on that.

    So as you can see this is a little frustrating, because how can I keep the
    main outside table border set at 1(fine line) when it will just change to
    a visual thickness of 2 if I add something inside the td cell!? this is something
    very simple, but I have never noticed it before, rather confusing.

    maybe someone can help, please.

    I am using IE6 and Windows 98

    Thankyou,

    Ben


  2. #2
    vb toit Guest

    Re: Simple table border size problem - someone must know this!

    <table border=1 cellpadding=0 cellspacing=0>
    <tr>
    <td>your data</td>
    <td>more data</td>
    </tr>
    </table>

    Try that bit of code and see if it changes the border dimension.

    "Ben" <drummer303uk@yahoo.com> wrote in message news:3eb46b77$1@tnews.web.devx.com...
    >
    > Hi there,
    >
    > Working on a web page recently using bare html in Windows Notepad I discovered
    > a problem with table borders that I have never encountered before. I do not
    > know why it happens but it is pretty frustrating, maybe someone can give
    > some info on why this is happening and what I can do to fix the problem.
    >
    > Well think of a basic table, with its border set to 1, but no cellpadding
    > or cellspacing and just one td cell. The border of course is a fine line
    > set at 1.
    >
    > But, when I put anything inside the table cell, just text, or perhaps another
    > table inside the cell, anything at all it seems, well visually it changes
    > the border thickness of the main table to a size of 2 even though I have
    > it set at 1 in the html code.
    >
    > I was thinking if you have the table border set to 1 then putting something
    > inside the td cell then that td cell now has a border of 1 as well so it
    > could be combining with the border size of 1 around the outside border of
    > the table which makes it look like 2? and because if you add more td cells
    > then they have borders as well just because you set a border value in the
    > main table tag. But maybe I am wrong on that.
    >
    > So as you can see this is a little frustrating, because how can I keep the
    > main outside table border set at 1(fine line) when it will just change to
    > a visual thickness of 2 if I add something inside the td cell!? this is something
    > very simple, but I have never noticed it before, rather confusing.
    >
    > maybe someone can help, please.
    >
    > I am using IE6 and Windows 98
    >
    > Thankyou,
    >
    > Ben
    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center