making one square appear in the top right corner of another

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

    #1

    making one square appear in the top right corner of another

    According to <http://www.w3schools.c om/Css/pr_class_positi on.asp>, "an
    element with position: absolute is positioned at the specified
    coordinates relative to its containing block."

    I'm trying to do something like that, myself. Place an element in a
    position relative to its containing block. Unfortunately, it doesn't
    seem to be working:



    I could use position: relative and assume that the box will always be
    200x200, but that's not a safe assumption. I could also do position:
    absolute, using the behavior that it's demonstrating, but again,
    that'd be making an unsafe assumption.

    Any ideas?
  • dorayme

    #2
    Re: making one square appear in the top right corner of another

    In article
    <80cd4c89-acd2-412a-889e-6e0af3eb047d@8g 2000hse.googleg roups.com>,
    yawnmoth <terra1024@yaho o.comwrote:
    According to <http://www.w3schools.c om/Css/pr_class_positi on.asp>, "an
    element with position: absolute is positioned at the specified
    coordinates relative to its containing block."
    >
    I'm trying to do something like that, myself. Place an element in a
    position relative to its containing block. Unfortunately, it doesn't
    seem to be working:
    >

    >
    I could use position: relative and assume that the box will always be
    200x200, but that's not a safe assumption. I could also do position:
    absolute, using the behavior that it's demonstrating, but again,
    that'd be making an unsafe assumption.
    >
    Any ideas?
    Is this what you want:

    <http://dorayme.890m.co m/alt/relativelyAbsol ute.html>

    --
    dorayme

    Comment

    • yawnmoth

      #3
      Re: making one square appear in the top right corner of another

      On Aug 6, 5:59 pm, dorayme <doraymeRidT... @optusnet.com.a uwrote:
      In article
      <80cd4c89-acd2-412a-889e-6e0af3eb0...@8g 2000hse.googleg roups.com>,
      >
      >
      >
       yawnmoth <terra1...@yaho o.comwrote:
      According to <http://www.w3schools.c om/Css/pr_class_positi on.asp>, "an
      element with position: absolute is positioned at the specified
      coordinates relative to its containing block."
      >
      I'm trying to do something like that, myself.  Place an element in a
      position relative to its containing block.  Unfortunately, it doesn't
      seem to be working:
      >>
      I could use position: relative and assume that the box will always be
      200x200, but that's not a safe assumption.  I could also do position:
      absolute, using the behavior that it's demonstrating, but again,
      that'd be making an unsafe assumption.
      >
      Any ideas?
      >
      Is this what you want:
      >
      <http://dorayme.890m.co m/alt/relativelyAbsol ute.html>
      Yup - I guess adding position: relative to the containing block did
      the trick - thanks!

      Comment

      Working...