Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old August 6th, 2008, 09: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 7th, 2008, 12:05 AM
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, 04: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

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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 network members.
Post your question now . . .
It's fast and it's free

Popular Articles