Connecting Tech Pros Worldwide Help | Site Map

making one square appear in the top right corner of another

 
LinkBack Thread Tools Search this Thread
  #1  
Old August 6th, 2008, 08:45 PM
yawnmoth
Guest
 
Posts: n/a
Default making one square appear in the top right corner of another

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/scrip...ox-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?

  #2  
Old August 6th, 2008, 11:05 PM
dorayme
Guest
 
Posts: n/a
Default Re: making one square appear in the top right corner of another

In article
<80cd4c89-acd2-412a-889e-6e0af3eb047d@8g2000hse.googlegroups.com>,
yawnmoth <terra1024@yahoo.comwrote:
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/scrip...ox-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
  #3  
Old August 7th, 2008, 03:05 PM
yawnmoth
Guest
 
Posts: n/a
Default Re: making one square appear in the top right corner of another

On Aug 6, 5:59*pm, dorayme <doraymeRidT...@optusnet.com.auwrote:
Quote:
In article
<80cd4c89-acd2-412a-889e-6e0af3eb0...@8g2000hse.googlegroups.com>,
>
>
>
*yawnmoth <terra1...@yahoo.comwrote:
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."
>
Quote:
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:
>>
Quote:
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.
>
Quote:
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!
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.