What's the difference between float and align?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Viken Karaguesian

    What's the difference between float and align?

    Hello,

    Just wondering what the difference is between "float" and "align"? If I
    align a picture to the left, is that not the same as floating it? Can align
    and float be used together or do you use one or the other?

    Thanks for your replies...

    Viken


  • Lars Eighner

    #2
    Re: What's the difference between float and align?

    In our last episode,
    <e6ednWNzl-WsdN3fRVn-2A@comcast.com> ,
    the lovely and talented Viken Karaguesian
    broadcast on comp.infosystem s.www.authoring.stylesheets:
    [color=blue]
    > Hello,[/color]
    [color=blue]
    > Just wondering what the difference is between "float" and "align"? If I
    > align a picture to the left, is that not the same as floating it? Can align
    > and float be used together or do you use one or the other?[/color]
    [color=blue]
    > Thanks for your replies...[/color]

    The main difference is that in CSS 1 & 2 there is no property
    "align" whereas the property "float" exists. The property
    "text-align" applies to the *content* of a box, while "float"
    applies to the box itself.

    --
    Lars Eighner eighner@io.com http://www.larseighner.com/
    An effective way to deal with predators is to taste terrible.

    Comment

    • Viken Karaguesian

      #3
      Re: What's the difference between float and align?

      > The main difference is that in CSS 1 & 2 there is no property[color=blue]
      > "align" whereas the property "float" exists.[/color]

      Is "align" an HTML tag, then? And would it be the same as "float"?

      [color=blue]
      >The property
      > "text-align" applies to the *content* of a box, while "float"
      > applies to the box itself.
      >
      > --
      > Lars Eighner eighner@io.com
      > http://www.larseighner.com/
      > An effective way to deal with predators is to taste terrible.[/color]


      Comment

      • Harlan Messinger

        #4
        Re: What's the difference between float and align?

        Viken Karaguesian wrote:[color=blue][color=green]
        >>The main difference is that in CSS 1 & 2 there is no property
        >>"align" whereas the property "float" exists.[/color]
        >
        >
        > Is "align" an HTML tag, then? And would it be the same as "float"?[/color]

        It's an HTML *attribute*--a deprecated one. Only when used with TABLE
        and IMG and set to certain values, it has the same basic function as CSS
        float.

        Comment

        • Lauri Raittila

          #5
          Re: What's the difference between float and align?

          in comp.infosystem s.www.authoring.stylesheets, Viken Karaguesian wrote:[color=blue]
          > Hello,
          >
          > Just wondering what the difference is between "float" and "align"?[/color]

          Float means same every time, align means different things when used on
          different elements or values.
          [color=blue]
          > If I
          > align a picture to the left, is that not the same as floating it?[/color]

          Not always, but should be.
          [color=blue]
          > Can align and float be used together[/color]

          Yes,
          [color=blue]
          > or do you use one or the other?[/color]

          Use float, and of course text-lign and margin instead of align.

          --
          Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
          Utrecht, NL.

          Comment

          • Unknown User

            #6
            Re: What's the difference between float and align?

            On Wed, 23 Mar 2005 01:22:58 -0300, Lars Eighner <eighner@io.com > wrote:
            [color=blue]
            > The main difference is that in CSS 1 & 2 there is no property
            > "align" whereas the property "float" exists. The property
            > "text-align" applies to the *content* of a box, while "float"
            > applies to the box itself.[/color]

            True. As a side note: in IE 5.5, you can use text-align to float boxes.
            This is not a feature, this is a bug.


            --
            Boost the visibility of your web site in Google!


            Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

            http://www.auriance.com - http://www.auriance.net

            Comment

            • Lars Eighner

              #7
              Re: What's the difference between float and align?

              In our last episode, <bp6dnQbCgYS0bN 3fRVn-uA@comcast.com> , the
              lovely and talented Viken Karaguesian broadcast on
              comp.infosystem s.www.authoring.stylesheets:
              [color=blue][color=green]
              >> The main difference is that in CSS 1 & 2 there is no property
              >> "align" whereas the property "float" exists.[/color][/color]
              [color=blue]
              > Is "align" an HTML tag, then? And would it be the same as "float"?[/color]

              "ALIGN" is a deprecated HTML attribute. It was applied to many
              different elements. In some contexts it was supposed to be
              similar to the style float. In others it was supposed to be
              like text-align. As it was rendered in some browsers, it looked
              like both float and text-align. That is <DIV ALIGN="center">
              in many browsers would both center the DIV and everything
              within it. In other words, it would take the place of the
              really, really deprecated <CENTER> tag in some browsers.

              Interpretations of the ALIGN attribute still vary according
              to element and browser. The css properties float and text-align
              are now more consistently rendered by more (current) browsers
              across more (appropriate) elements than ALIGN ever was. So
              I suggest that instead of trying to untangle ALIGN, use css
              to get a better chance of having what you want in more browsers.
              [color=blue][color=green]
              >> The property "text-align" applies to the *content* of a box,
              >> while "float" applies to the box itself.[/color][/color]

              --
              Lars Eighner eighner@io.com http://www.larseighner.com/
              "I have never made but one prayer to God, a very short one: 'O Lord,
              make my enemies ridiculous.' And God granted it." --Voltaire

              Comment

              Working...