473,466 Members | 1,377 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Absolute positioning calculating against body

Since my HTML is failing to render properly on either FF2 or IE6, I wonder
if my understanding of the CSS is faulty. What I want is to place a little
box at the top right corner of my content area, the tricky part being that
the content area is not the body itself but rather a div. My understanding
of CSS is that 'position: absolute' is relative to the containing block
(9.3.1), which should be the div. However, both FF and IE offset against the
body rather than the containing block. So are the browsers not compliant or
is my CSS wrong?

<style>
..littlebox { position: absolute; right: 1in }
..bigbox { width: 8.5in; height: 11in }
</style>

<div class="bigbox">
<div class="littlebox">
<!-- Expecting this to be offset from bigbox, but it offsets against
body -->
</div>
</div>
Aug 2 '07 #1
2 2089
rf

"Ham Pastrami" <no****@dot.comwrote in message
news:6i*****************@nlpi070.nbdc.sbc.com...
Since my HTML is failing to render properly on either FF2 or IE6, I wonder
if my understanding of the CSS is faulty. What I want is to place a little
box at the top right corner of my content area, the tricky part being that
the content area is not the body itself but rather a div. My understanding
of CSS is that 'position: absolute' is relative to the containing block
The containing block is not the parent. It is the nearest ancestor that has
a position of other than static.
http://www.w3.org/TR/CSS21/visudet.h...-block-details

..bigbox {... postion: relative; }

--
Richard.
Aug 2 '07 #2
In article <6i*****************@nlpi070.nbdc.sbc.com>,
"Ham Pastrami" <no****@dot.comwrote:

btw, inches are not a good idea from screen viewing. But I really
came back to tell you I know a terrific joke about pastrami.

--
dorayme
Aug 2 '07 #3

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

Similar topics

5
by: Duane Lambe | last post by:
On some suggestions from this group, I've started to turn my internal helpdesky site for our company to non-absolute positioning. I've been reading O'Reilly's CSS book, and several web sites and...
7
by: Griff Miller | last post by:
Please see http://home.houston.rr.com/gmiller15/css/vertprob.html . In mozilla 1.6/1.7 it looks the way I want it, with a thin separation between the two boxes. In IE6, the two boxes touch, which...
6
by: Gustaf Liljegren | last post by:
Here's what I'm trying to achieve: 1. A <div>, centered on screen, 600px wide and 100px high, with a background-image (also 600 x 100). 2. Text (an <h1> element) positioned with precision inside...
4
by: Alan Silver | last post by:
Hello, Having been a light reader of this ng for a few months now (after several years absence), I have noticed that absolute positioning seems to be considered a Very Bad Thing around here....
2
by: nonsensitor | last post by:
I'm just learning xhtml & css, primarily from westciv's online tutorials and css guide. I've run into a couple of problems with a page I'm developing that I can't figure out. The first problem is...
2
by: nino9stars | last post by:
Hello, I have just started messing with absolute positioning on webpages, and it definitely let's you do some creative things. Well, after much searching and help, I got the images I was using...
3
by: mikewse | last post by:
I have a strange problem where it seems IE is doing the correct layout but Firefox and Safari isn't. I think I'm probably wrong, and there is something in the standards that say behaviour should be...
0
by: sknonline | last post by:
Greetings. I am having troubles using absolute positioning in IE6. When I establish the width as 100%, it's not spanning the entire width of the browser. It works in Firefox, Safari, and IE7.......
14
by: Fistro | last post by:
I'm trying to find a design that would allow me to build web pages without having to worry about compatibility issues (not too much, in any case,,,) I've came across this CSS layout technique:...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.