HighDots Forums  

making one square appear in the top right corner of another

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss making one square appear in the top right corner of another in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
yawnmoth
 
Posts: n/a

Default making one square appear in the top right corner of another - 08-06-2008 , 04:37 PM






According to <http://www.w3schools.com/Css/pr_class_position.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:

http://www.frostjedi.com/terra/scripts/demo/box-in-box.html

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?

Reply With Quote
  #2  
Old   
dorayme
 
Posts: n/a

Default Re: making one square appear in the top right corner of another - 08-06-2008 , 06:59 PM






In article
<80cd4c89-acd2-412a-889e-6e0af3eb047d (AT) 8g2000hse (DOT) googlegroups.com>,
yawnmoth <terra1024 (AT) yahoo (DOT) com> wrote:

Quote:
According to <http://www.w3schools.com/Css/pr_class_position.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:

http://www.frostjedi.com/terra/scripts/demo/box-in-box.html

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.com/alt/relativelyAbsolute.html>

--
dorayme


Reply With Quote
  #3  
Old   
yawnmoth
 
Posts: n/a

Default Re: making one square appear in the top right corner of another - 08-07-2008 , 10:55 AM



On Aug 6, 5:59*pm, dorayme <doraymeRidT... (AT) optusnet (DOT) com.au> wrote:
Quote:
In article
80cd4c89-acd2-412a-889e-6e0af3eb0... (AT) 8g2000hse (DOT) googlegroups.com>,



*yawnmoth <terra1... (AT) yahoo (DOT) com> wrote:
According to <http://www.w3schools.com/Css/pr_class_position.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:

http://www.frostjedi.com/terra/scripts/demo/box-in-box.html

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.com/alt/relativelyAbsolute.html
Yup - I guess adding position: relative to the containing block did
the trick - thanks!


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.