Loading ...
Sorry, an error occurred while loading the content.
 

Re: [NH] CSS "Margin" acting like "Indent"

Expand Messages
  • loro
    ... Wrap the text in a block level element (P, DIV) and use the class with that. Or simply use padding-left for the TD if all text in that TD should be
    Message 1 of 19 , May 20, 2008
      Ray wrote:
      >I don't comprehend what you are saying. I tried several permutations
      >of moving
      >the basic-summary class into the TD tag or changing the style sheet to use
      >indent instead of margin-left. Most of my trials failed validation
      >and none of
      >them produce the desired result.

      Wrap the text in a block level element (P, DIV) and use the class
      with that. Or simply use padding-left for the TD if all text in that
      TD should be indented.

      Lotta
    • Bruce Meyers
      Bruce, Here is a list of the most common block elements: was not listed, but I believe it is also a block
      Message 2 of 19 , May 20, 2008
        Bruce,
        Here is a list of the most common block elements:
        <p>
        <div>
        <blockquote>
        <table>
        <br>
        <ol> <ul> was not listed, but I believe it is also a block element
        and the <h1> to <h6> tags
        The block exists between the opening and closing tags.

        A block element is one that is intended to be displayed as a distinct block of content starting and ending with a new line.

        inline elements don't necessarily begin and end with new lines; they are contained within
        the flow of the text. examples: <em> <span> <b> <img> <a>

        in css, the box model involving border, margin, and padding applies to block elements
        but not to inline elements (not a complete comprehensive explanation of all the attributes of block and inline elements - just all I know at this time)

        Bruce Meyers


        bruce.somers@... wrote:
        That's interesting:
        "You tried to use a box attribute (margin) in an inline element (font). Try eliminating the tag entirely and moving the "class" to the element."

        Is there a comprehensive list somewhere, of block and inline elements and what attributes apply to each?

        Bruce


        ------------------------------------

        Fookes Software: http://www.fookes.com/
        NoteTab website: http://www.notetab.com/
        NoteTab Discussion Lists: http://www.notetab.com/groups.php

        ***
        Yahoo! Groups Links







        [Non-text portions of this message have been removed]
      • Axel Berger
        ... No it won t. You re styling a specific cell with a specific class there. Any styles like {padding-left: 2%} will only apply to your CLASS= basic_summary .
        Message 3 of 19 , May 20, 2008
          Ray Shapp wrote:
          > The problem is that cellpadding applies to every cell in the
          > table.

          No it won't. You're styling a specific cell with a specific class
          there. Any styles like {padding-left: 2%} will only apply to your
          CLASS="basic_summary".

          I'll look at your full example later.

          Axel
        • Axel Berger
          ... I d be aunable to write a single line without just such a list permanently available to refer to. Unfortunately mine s in German. It s this:
          Message 4 of 19 , May 20, 2008
            bruce.somers@... wrote:
            > Is there a comprehensive list somewhere, of block and inline
            > elements and what attributes apply to each?

            I'd be aunable to write a single line without just such a list
            permanently available to refer to. Unfortunately mine's in German.
            It's this:
            http://de.selfhtml.org/
            I've just seen, there's French, Spanish and Japanese too, maybe
            you'd like to volunteer to do the English?

            Axel
          • Ray Shapp
            Hello Hugo and Bruce Meyers et al. That s it!!!! Your example works exactly as desired. It even passes the HTML validation test. I won t ask for further
            Message 5 of 19 , May 20, 2008
              Hello Hugo and Bruce Meyers et al.

              That's it!!!!

              Your example works exactly as desired. It even passes the HTML validation
              test.

              I won't ask for further modifications, however, I am a bit puzzled because
              Marcelo advised, "Try eliminating the <font> tag entirely and moving the
              "class" to the <td> element". Hugo's solution did not work when the class was
              applied to the TD element, but it works fine in the font tag.

              Bruce, your quick listing of block versus inline elements is a bonus.
              Apparently Hugo's "display: block;" line in the CSS file is what permits the
              "margin-left" specification to be effective.

              Many thanks to everyone who helped.

              Ray Shapp

              ***CSS snippet offered by Hugo***

              .basic_summary {
              display: block;
              color : #000000;
              font-family : Arial, sans-serif;
              font-size : .8em;
              margin-left: 2%;
              margin-right: 0%;
              }

              ***HTML snippet with Hugo's class applied to the font tag***

              <tr>
              <td colspan="2"></td>
              <td><font class="basic_summary">Background on the discovery of the object that
              would later be named Eris as well as its impact on the "Pluto as a
              planet" debate.</font></td>
              <td></td>
              </tr>
            • loro
              ... Margin properties do apply to inline elements. They just don t do what Ray wants when used with them. http://www.w3.org/TR/CSS2/box.html#margin-properties
              Message 6 of 19 , May 20, 2008
                Bruce wrote:
                >That's interesting:
                >"You tried to use a box attribute (margin) in an inline element
                >(font). Try eliminating the <font> tag entirely and moving the
                >"class" to the <td> element."

                Margin properties do apply to inline elements. They just don't do
                what Ray wants when used with them.
                http://www.w3.org/TR/CSS2/box.html#margin-properties

                >Is there a comprehensive list somewhere, of block and inline
                >elements and what attributes apply to each?

                The HTML 4.01 spec. In a more easy to read form here:
                <http://www.htmlhelp.com/reference/html40/block.html>

                Lotta
              • sandeep syamnath
                Hi, Please unsubscribe my id. Thanks, Sandeep
                Message 7 of 19 , May 25, 2008
                  Hi,
                  Please unsubscribe my id.

                  Thanks,
                  Sandeep
                • loro
                  ... You have to get off the same way you got on, by doing it yourself. There are instructions in the footer of each post. Lotta
                  Message 8 of 19 , May 25, 2008
                    sandeep syamnath wrote:
                    >Please unsubscribe my id.

                    You have to get off the same way you got on, by doing it yourself.
                    There are instructions in the footer of each post.

                    Lotta
                  • fw7oaks
                    ... If easier than that, there s a link unsubscribe . Click it and you are GONE.
                    Message 9 of 19 , May 25, 2008
                      --- On Sun, 5/25/08, loro <loro-spam01-@...> wrote:


                      > You have to get off the same way you got on, by doing it yourself.

                      > There are instructions in the footer of each post.

                      If easier than that, there's a link 'unsubscribe'. Click it and you are GONE.
                    • Julie
                      To quote an old Eagles tune, they re Already gone . :)
                      Message 10 of 19 , May 25, 2008
                        To quote an old Eagles' tune, they're "Already gone". :)

                        At 5/25/2008 12:27 PM, loro wrote:
                        >sandeep syamnath wrote:
                        > >Please unsubscribe my id.
                        >
                        >You have to get off the same way you got on, by doing it yourself.
                        >There are instructions in the footer of each post.
                        >
                        >Lotta
                      Your message has been successfully submitted and would be delivered to recipients shortly.