3 Replies Latest reply on Nov 20, 2008 1:19 PM by Newsgroup_User

    Padding or margins

    newbie1420
      When I make a style and use padding or margins, it only indents the 1st line by the 5 pix I set it at. I have the box checked for "use for all" in the CSS box setup. Help!
        • 1. Re: Padding or margins
          Level 7
          Let's see your code, please.

          --
          Murray --- ICQ 71997575
          Adobe Community Expert
          (If you *MUST* email me, don't LAUGH when you do so!)
          ==================
          http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
          http://www.dwfaq.com - DW FAQs, Tutorials & Resources
          ==================


          "newbie1420" <webforumsuser@macromedia.com> wrote in message
          news:gg3t5c$dml$1@forums.macromedia.com...
          > When I make a style and use padding or margins, it only indents the 1st
          > line by the 5 pix I set it at. I have the box checked for "use for all" in
          > the CSS box setup. Help!

          • 2. Re: Padding or margins
            newbie1420 Level 1
            <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
            <html xmlns=" http://www.w3.org/1999/xhtml">
            <head>
            <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
            <title>Untitled Document</title>
            <style type="text/css">
            <!--
            .text12pixblk { font-family: Verdana, Arial, Helvetica, sans-serif;
            font-size: 10px;
            font-style: normal;
            font-weight: normal;
            color: #000000;
            padding: 5px;
            margin-top: 0px;
            margin-right: 0px;
            margin-bottom: 0px;
            margin-left: 0px;
            }
            -->
            </style>
            </head>

            <body>
            <table width="261" border="0" cellspacing="5" cellpadding="5">
            <tr>
            <th scope="col"><div align="left"><font size="2"><font size="2"><a href="HBU.html"></a><a href="HBU.html"><span class="text12pixblk">Broadcasters changing TV channel assignments may have you wanting an antenna that doesn't have lengthy, low-band VHF elements. <br />
            <br />
            For a more compact antenna with all you may need for digital reception, check out our HBU22 and HBU44! Less wind load, easier to install.</span></a></font></font></div></th>
            </tr>
            </table>
            </body>
            </html>
            • 3. Re: Padding or margins
              Level 7
              Here's your CSS -

              .text12pixblk { font-family: Verdana, Arial, Helvetica, sans-serif;
              font-size: 10px;
              font-style: normal;
              font-weight: normal;
              color: #000000;
              padding: 5px;
              margin-top: 0px;
              margin-right: 0px;
              margin-bottom: 0px;
              margin-left: 0px;
              }

              and your affected content -

              <th scope="col"><div align="left"><font size="2"><font size="2"><a
              href="HBU.html"></a><a href="HBU.html"><span
              class="text12pixblk">Broadcasters
              changing TV channel assignments may have you wanting an antenna that
              doesn't
              have lengthy, low-band VHF elements. <br />
              <br />
              For a more compact antenna with all you may need for digital reception,
              check out our HBU22 and HBU44! Less wind load, easier to
              install.</span></a></font></font></div></th>

              Your code is pretty bad. But I assume you want the text to be moved away
              from the edges of the cell, is that correct? In that case you'd want to
              apply padding to that particular cell, e.g.,

              .text12pixblk {
              font-family: Verdana, Arial, Helvetica, sans-serif;
              font-size: small;
              color: #000000;
              padding: 5px;
              }

              <th scope="col" class="text12pixblk"><a href="HBU.html"><p>Broadcasters
              changing TV channel assignments may have you wanting an antenna that
              doesn't have lengthy, low-band VHF elements. </p>
              <p>For a more compact antenna with all you may need for digital reception,
              check out our HBU22 and HBU44! Less wind load, easier to install.</a></th>

              Now - those styles will apply to the cell with the class assignment. Note
              that I have cleaned up your code by removing deprecated markup (the <font>
              tags), unnecessary markup (the empty anchor - <a href="HBU.html"></a>, the
              <div>, the <span>, and the <br /> tags). But I would go further.

              If you define the font family and color in the body tag, then you wouldn't
              need to redefine it in other places, e.g.,

              .text12pixblk {
              font-size: small;
              padding: 5px;
              }

              In addition, I'd use a different CSS selector - presumably you want to reuse
              this styling, so I'd make the selector one that automatically applies
              throughout the page, and further, I'd change your usage of the <th> tag
              (which has a real use on its own) to a <td> tag, e.g.,

              table.special td {
              font-size: small;
              padding: 5px;
              }
              (note that this now applies to all <td> tags within a table with a class of
              "special", like you would see below)

              <table class="special">
              ...
              <td scope="col"><a href="HBU.html"><p>Broadcasters changing TV channel
              assignments may have you wanting an antenna that doesn't have lengthy,
              low-band VHF elements. </p>
              <p>For a more compact antenna with all you may need for digital reception,
              check out our HBU22 and HBU44! Less wind load, easier to install.</a></td>
              ...
              </table>


              --
              Murray --- ICQ 71997575
              Adobe Community Expert
              (If you *MUST* email me, don't LAUGH when you do so!)
              ==================
              http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
              http://www.dwfaq.com - DW FAQs, Tutorials & Resources
              ==================


              "newbie1420" <webforumsuser@macromedia.com> wrote in message
              news:gg3t5c$dml$1@forums.macromedia.com...
              > When I make a style and use padding or margins, it only indents the 1st
              > line by the 5 pix I set it at. I have the box checked for "use for all" in
              > the CSS box setup. Help!