Web Analytics Made Easy -
StatCounter CSS & Cellspacing. - CodingForum

Announcement

Collapse
No announcement yet.

CSS & Cellspacing.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • CSS & Cellspacing.

    Forum,

    I'm trying to make the left spacing equal to 0. I have tried setting padding:left equal to 0, but that doesn't work. Any suggestions??

    I also would like cellspacing to the right to in smaller. Such as 1/2 instead of 1. Any help here as well??

    Thanks,

    Code:
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Untitled Document</title>
    </head>
    
    <body>
    <p>I'm trying to make the left spacing equal to 0. I have tried setting padding:left equal to 0, but that doesn't work. Any suggestions??</p>
    <table width="112" border="0" cellpadding="0" cellspacing="1" bgcolor="#D5DCD1" style="padding:left=0 ">
      <tr>
        <td bgcolor="#F9F9F9"><p>&nbsp;</p>
            <p>example 1 </p>
            <p>&nbsp;</p>
            <p>&nbsp;</p></td>
      </tr>
      <tr>
        <td bgcolor="#F9F9F9"><p>example 2 </p>
            <p>&nbsp;</p></td>
      </tr>
      <tr>
        <td bgcolor="#F9F9F9"><p>example 3 </p>
            <p>&nbsp;</p>
            <p>&nbsp; </p></td>
      </tr>
    </table>
    <p>&nbsp;</p>
    </body>
    </html>

  • #2
    Code:
    p {margin-left: 5px}
    or for no margin:
    Code:
    p {margin-left: 0px}
    put this in your css, and it will give all the text wrapped in the <p></p> tags a 5 pixel indent from the left (in a table or outside of one)

    to make marqin right, just replace the -left with -right

    (it's not exactly padding, but it works)

    oh, and if you only want text in boxes, do this:
    Code:
    p.box {margin-left: 0px}
    then, for the text:
    <p class="box">text in box with no padding </p>
    Last edited by ianmarlowe; Aug 3, 2005, 06:41 AM.
    i'm only 12, gimme some slack

    Comment


    • #3
      Cell spacing

      You could start by setting this one:
      ... cellpadding="0" cellspacing="1" bgcolor="#D5DCD1"...
      to 0, or removing it altogether.
      If you want to set cell spacing, that is the empty space inbetween cells, you could use the CSS margin properties; if you want to control the empty space around a cell's content, use either the padding properties on the cell, or the margin or padding properties on the content.
      Regards,
      Ronald.
      ronaldvanderwijden.com

      Comment

      Working...
      X