473,402 Members | 2,072 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

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?
Aug 6 '08 #1
2 2064
In article
<80**********************************@8g2000hse.go oglegroups.com>,
yawnmoth <te*******@yahoo.comwrote:
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
Aug 6 '08 #2
On Aug 6, 5:59*pm, dorayme <doraymeRidT...@optusnet.com.auwrote:
In article
<80cd4c89-acd2-412a-889e-6e0af3eb0...@8g2000hse.googlegroups.com>,

*yawnmoth <terra1...@yahoo.comwrote:
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>
Yup - I guess adding position: relative to the containing block did
the trick - thanks!
Aug 7 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: cplusplus | last post by:
Hello, I have newbie question. I'm stuck on this current assignment. Write a program that prompts the user for two integer values, passes the values to a function where they are multiplied...
1
by: Tamir Kamara | last post by:
Hi, I have a page with several server controls (textboxes, datagrid, ...) which are positioned absolutely from the right of the page (like RIGHT: 25px; POSITION: absolute;). that works well if...
3
by: blaq | last post by:
My latest project is almost done. It looks great in Firefox; I only have two IE bugs left to squash, yay! Please refer to http://www.blaqzone.com/Temp/Popfuel/ . Crib notes: - "reset.css" is...
1
by: Andrew Gillett | last post by:
I have made a mock up for a web application that requires the use of tabbed panels. I've looked at some good examples of how to implement the tab bar (e.g. sliding doors on a list apart), but I have...
14
by: dutch90 | last post by:
Hi I want to make my header table (with the logo and nav menu) start at 0,0. I tried body {margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding:0px;} but I...
1
by: magic man | last post by:
I am 50 years old ...and am working physical models of the math structure called a magic square .. for my own interest. My present problem is this. I have a topograhical model for the square...
14
by: v4vijayakumar | last post by:
In computer based, two player, board games, how to make computer play? Are there any formal ways to _teach_ computer, to choose best possible move? I know this is kind of off-topic here. Please...
5
by: WanHongbin | last post by:
#include <stdio.h> double square(); /*without declare main() { double s; s = square(2); printf("%g\n", s); }
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.