Position absolute plus float

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

    Position absolute plus float

    What would be the behaviour and characteristics of a div that was both
    positioned absolute, and floated?
    Are they contradictory or complementary regarding how the div is perceived
    by other content?
    Is it a valid or stupid thing to do?

    Brian Tozer


  • Evertjan.

    #2
    Re: Position absolute plus float

    KiwiBrian wrote on 27 feb 2005 in
    comp.infosystem s.www.authoring.stylesheets:
    [color=blue]
    > What would be the behaviour and characteristics of a div that was both
    > positioned absolute, and floated?[/color]

    Did you test it?
    [color=blue]
    > Are they contradictory or complementary regarding how the div is
    > perceived by other content?[/color]

    Contradictorily
    [color=blue]
    > Is it a valid or stupid thing to do?[/color]

    not valid ...........


    --
    Evertjan.
    The Netherlands.
    (Replace all crosses with dots in my emailaddress)

    Comment

    • Steve Pugh

      #3
      Re: Position absolute plus float

      "KiwiBrian" <briantoz@ihug. co.nz> wrote:
      [color=blue]
      >What would be the behaviour and characteristics of a div that was both
      >positioned absolute, and floated?[/color]

      The CSS spec has a section entitled
      "Relationsh ips between 'display', 'position', and 'float'"

      [color=blue]
      >Are they contradictory or complementary regarding how the div is perceived
      >by other content?[/color]

      Contradictory in that the absolute positioning means that the value of
      the float property is always 'none' regardless of what you write in
      your CSS.
      [color=blue]
      >Is it a valid or stupid thing to do?[/color]

      Both.
      There's nothing stopping you applying both position: absolute and
      float to an element so it's "valid". But it's also pointless.

      Steve

      --
      "My theories appal you, my heresies outrage you,
      I never answer letters and you don't like my tie." - The Doctor

      Steve Pugh <steve@pugh.net > <http://steve.pugh.net/>

      Comment

      • Richard

        #4
        Re: Position absolute plus float

        On Mon, 28 Feb 2005 05:10:42 +1300 KiwiBrian wrote:
        [color=blue]
        > What would be the behaviour and characteristics of a div that was both
        > positioned absolute, and floated?
        > Are they contradictory or complementary regarding how the div is perceived
        > by other content?
        > Is it a valid or stupid thing to do?
        >
        > Brian Tozer
        >[/color]

        Position states where the current division is to be placed.
        Float states where the adjoining division is to be placed.
        e.g.
        Position a division at 200px top; 200px; right and float:left.
        The next division is placed to the right of that division.


        Comment

        • Steve Pugh

          #5
          Re: Position absolute plus float

          "Richard" <Anonymous@127. 001> wrote:[color=blue]
          >On Mon, 28 Feb 2005 05:10:42 +1300 KiwiBrian wrote:
          >[color=green]
          >> What would be the behaviour and characteristics of a div that was both
          >> positioned absolute, and floated?
          >> Are they contradictory or complementary regarding how the div is perceived
          >> by other content?
          >> Is it a valid or stupid thing to do?
          >>[/color]
          >
          >Position states where the current division is to be placed.[/color]

          Massively over simplified but correct.
          [color=blue]
          >Float states where the adjoining division is to be placed.[/color]

          Incorrect. Go read the CSS spec.
          [color=blue]
          >e.g.
          >Position a division at 200px top; 200px; right and float:left.
          >The next division is placed to the right of that division.[/color]

          Nope. Its placed as if that division doesn't exist. The float is
          ignored because of the position: absolute (assuming you are blathering
          about position: absolute as that's what the OP asked about). Go read
          the CSS spec.

          Steve

          --
          "My theories appal you, my heresies outrage you,
          I never answer letters and you don't like my tie." - The Doctor

          Steve Pugh <steve@pugh.net > <http://steve.pugh.net/>

          Comment

          Working...