Frame shows spaces between the table cells.

Discussion in 'ASP .Net' started by Cal Who, May 16, 2010.

  1. Cal Who

    Cal Who Guest

    I want to making a frame so I made a table:

    ..
    <table>

    <tr><td id="TL"></td><td id="T"></td><td id="TR"></td></tr>

    <tr><td id="L"></td><td id="C"></td><td id="R"></td></tr>

    <tr><td id="BL"></td><td id="B"></td><td id="BR"></td></tr>





    </table>

    and in my .css added things like that shown below.

    Works OK except that the cells do not touch. There is a little space between
    the images like there is a margin or padding.

    Got any ides how to fix that?


    Thanks
    #BR

    {

    background:url("../MapBorderImages/BR.jpg") no-repeat scroll left top
    transparent;

    width:28px;

    height:28px;

    padding :0 ;

    margin :0 ;


    }

    ?

    #B

    {

    background:url("../MapBorderImages/B.jpg") repeat scroll left top
    transparent;

    width:100px;

    height:28px;

    padding :0 ;

    margin :0 ;


    }
     
    Cal Who, May 16, 2010
    #1
    1. Advertising

  2. On May 16, 3:43 am, " Cal Who" <> wrote:
    > I want to making a frame so I made a table:
    >
    > .
    > <table>
    >
    > <tr><td id="TL"></td><td id="T"></td><td id="TR"></td></tr>
    >
    > <tr><td id="L"></td><td id="C"></td><td id="R"></td></tr>
    >
    > <tr><td id="BL"></td><td id="B"></td><td id="BR"></td></tr>
    >
    > </table>
    >
    > and in my .css added things like that shown below.
    >
    > Works OK except that the cells do not touch. There is a little space between
    > the images like there is a margin or padding.
    >
    > Got any ides how to fix that?
    >
    > Thanks
    > #BR
    >
    > {
    >
    > background:url("../MapBorderImages/BR.jpg") no-repeat scroll left top
    > transparent;
    >
    > width:28px;
    >
    > height:28px;
    >
    > padding :0 ;
    >
    > margin :0 ;
    >
    > }
    >
    > ?
    >
    > #B
    >
    > {
    >
    > background:url("../MapBorderImages/B.jpg") repeat scroll left top
    > transparent;
    >
    > width:100px;
    >
    > height:28px;
    >
    > padding :0 ;
    >
    > margin :0 ;
    >
    >
    >
    > }


    <table cellpadding="0" cellspacing="0" border="0">
     
    Alexey Smirnov, May 16, 2010
    #2
    1. Advertising

  3. Cal Who

    Cal Who Guest

    "Alexey Smirnov" <> wrote in message
    news:...
    On May 16, 3:43 am, " Cal Who" <> wrote:
    > I want to making a frame so I made a table:
    >
    > .
    > <table>
    >
    > <tr><td id="TL"></td><td id="T"></td><td id="TR"></td></tr>
    >
    > <tr><td id="L"></td><td id="C"></td><td id="R"></td></tr>
    >
    > <tr><td id="BL"></td><td id="B"></td><td id="BR"></td></tr>
    >
    > </table>
    >
    > and in my .css added things like that shown below.
    >
    > Works OK except that the cells do not touch. There is a little space
    > between
    > the images like there is a margin or padding.
    >
    > Got any ides how to fix that?
    >
    > Thanks
    > #BR
    >
    > {
    >
    > background:url("../MapBorderImages/BR.jpg") no-repeat scroll left top
    > transparent;
    >
    > width:28px;
    >
    > height:28px;
    >
    > padding :0 ;
    >
    > margin :0 ;
    >
    > }
    >
    > ?
    >
    > #B
    >
    > {
    >
    > background:url("../MapBorderImages/B.jpg") repeat scroll left top
    > transparent;
    >
    > width:100px;
    >
    > height:28px;
    >
    > padding :0 ;
    >
    > margin :0 ;
    >
    >
    >
    > }


    <table cellpadding="0" cellspacing="0" border="0">


    That did it. I tried putting it into my .css file but I was told they were
    unknown property names. Comment??

    But it works great in the markup.

    Thanks
     
    Cal Who, May 16, 2010
    #3
  4. On May 16, 10:16 pm, " Cal Who" <> wrote:
    > "Alexey Smirnov" <> wrote in message
    >
    > news:...
    > On May 16, 3:43 am, " Cal Who" <> wrote:
    >
    >
    >
    >
    >
    > > I want to making a frame so I made a table:

    >
    > > .
    > > <table>

    >
    > > <tr><td id="TL"></td><td id="T"></td><td id="TR"></td></tr>

    >
    > > <tr><td id="L"></td><td id="C"></td><td id="R"></td></tr>

    >
    > > <tr><td id="BL"></td><td id="B"></td><td id="BR"></td></tr>

    >
    > > </table>

    >
    > > and in my .css added things like that shown below.

    >
    > > Works OK except that the cells do not touch. There is a little space
    > > between
    > > the images like there is a margin or padding.

    >
    > > Got any ides how to fix that?

    >
    > > Thanks
    > > #BR

    >
    > > {

    >
    > > background:url("../MapBorderImages/BR.jpg") no-repeat scroll left top
    > > transparent;

    >
    > > width:28px;

    >
    > > height:28px;

    >
    > > padding :0 ;

    >
    > > margin :0 ;

    >
    > > }

    >
    > > ?

    >
    > > #B

    >
    > > {

    >
    > > background:url("../MapBorderImages/B.jpg") repeat scroll left top
    > > transparent;

    >
    > > width:100px;

    >
    > > height:28px;

    >
    > > padding :0 ;

    >
    > > margin :0 ;

    >
    > > }

    >
    > <table cellpadding="0" cellspacing="0" border="0">
    >
    > That did it. I tried putting it into my .css file but I was told they were
    > unknown property names. Comment??
    >
    > But it works great in the markup.
    >
    > Thanks


    Well, there isn't actually a CSS properties for cellpadding or
    cellspacing, but there is the CSS padding property which allows you to
    achieve the same effect.

    table {
    border-collapse: collapse;
    }
    table td,
    table th {
    padding: 0;
    }

    but this may not work in the same way in all browsers and I would
    recommend to use the cellspacing/cellpadding attributes.
     
    Alexey Smirnov, May 17, 2010
    #4
  5. Cal Who

    Cal Who Guest

    "Alexey Smirnov" <> wrote in message
    news:...
    On May 16, 10:16 pm, " Cal Who" <> wrote:
    > "Alexey Smirnov" <> wrote in message
    >
    > news:...
    > On May 16, 3:43 am, " Cal Who" <> wrote:
    >
    >
    >
    >
    >
    > > I want to making a frame so I made a table:

    >
    > > .
    > > <table>

    >
    > > <tr><td id="TL"></td><td id="T"></td><td id="TR"></td></tr>

    >
    > > <tr><td id="L"></td><td id="C"></td><td id="R"></td></tr>

    >
    > > <tr><td id="BL"></td><td id="B"></td><td id="BR"></td></tr>

    >
    > > </table>

    >
    > > and in my .css added things like that shown below.

    >
    > > Works OK except that the cells do not touch. There is a little space
    > > between
    > > the images like there is a margin or padding.

    >
    > > Got any ides how to fix that?

    >
    > > Thanks
    > > #BR

    >
    > > {

    >
    > > background:url("../MapBorderImages/BR.jpg") no-repeat scroll left top
    > > transparent;

    >
    > > width:28px;

    >
    > > height:28px;

    >
    > > padding :0 ;

    >
    > > margin :0 ;

    >
    > > }

    >
    > > ?

    >
    > > #B

    >
    > > {

    >
    > > background:url("../MapBorderImages/B.jpg") repeat scroll left top
    > > transparent;

    >
    > > width:100px;

    >
    > > height:28px;

    >
    > > padding :0 ;

    >
    > > margin :0 ;

    >
    > > }

    >
    > <table cellpadding="0" cellspacing="0" border="0">
    >
    > That did it. I tried putting it into my .css file but I was told they were
    > unknown property names. Comment??
    >
    > But it works great in the markup.
    >
    > Thanks


    Well, there isn't actually a CSS properties for cellpadding or
    cellspacing, but there is the CSS padding property which allows you to
    achieve the same effect.

    table {
    border-collapse: collapse;
    }
    table td,
    table th {
    padding: 0;
    }

    but this may not work in the same way in all browsers and I would
    recommend to use the cellspacing/cellpadding attributes.


    Thanks a lot
     
    Cal Who, May 17, 2010
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. gce
    Replies:
    0
    Views:
    775
  2. jcnews at earthlink.net

    PROBLEM: Images have spaces between table cells

    jcnews at earthlink.net, Nov 25, 2004, in forum: HTML
    Replies:
    3
    Views:
    1,321
    Duende
    Nov 25, 2004
  3. UJ
    Replies:
    8
    Views:
    61,318
  4. VUNETdotUS

    IE Shows Spaces Between Boxes

    VUNETdotUS, Nov 7, 2007, in forum: HTML
    Replies:
    8
    Views:
    439
    VUNETdotUS
    Nov 7, 2007
  5. Gianni

    IE shows false and Firefox shows true

    Gianni, Jul 10, 2009, in forum: Javascript
    Replies:
    3
    Views:
    460
    Thomas 'PointedEars' Lahn
    Jul 10, 2009
Loading...

Share This Page