HighDots Forums  

Re: position: relative

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


Discuss Re: position: relative in the Cascading Style Sheets forum.



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

Default Re: position: relative - 12-08-2007 , 12:24 PM







Quote:
http://www.blue-sky.co.uk/main.css

#navbar has 'position: relative' but to what end? Does 'position:
relative' have a bearing on the absolutely positioned descendents of
#navbar?
My understanding:

Block elements declared as relative or absolute, position themselves
relative to the closest enclosing element that is not statically
positioned.

So, if div-a is relative and encloses div-b, where div-b has
left, right top or bottom adjustments, means div-b will be
adjusted relative to div-a, rather than the body or some other
div that encloses div-a.

So, declaring div-a as relative may have more to do with positioning
its DOM children, than about positioning itself.




Reply With Quote
  #2  
Old   
Ben C
 
Posts: n/a

Default Re: position: relative - 12-10-2007 , 04:30 PM






On 2007-12-08, salmobytes <Sandy.Pittendrigh (AT) gmail (DOT) com> wrote:
Quote:
http://www.blue-sky.co.uk/main.css

#navbar has 'position: relative' but to what end? Does 'position:
relative' have a bearing on the absolutely positioned descendents of
#navbar?

My understanding:

Block elements declared as relative or absolute, position themselves
relative to the closest enclosing element that is not statically
positioned.
Almost. Relatively-positioned elements (block or not) have just the same
containing blocks as static ones-- i.e. just the nearest block ancestor.

It's only absolutely positioned ones whose CB is the nearest absolute or
fixed ancestor.


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

Default Re: position: relative - 12-10-2007 , 07:24 PM



On Dec 10, 3:30 pm, Ben C <spams... (AT) spam (DOT) eggs> wrote:
Quote:
Almost. Relatively-positioned elements (block or not) have just the same
containing blocks as static ones-- i.e. just the nearest block ancestor.

It's only absolutely positioned ones whose CB is the nearest absolute or
fixed ancestor.
Ok. That makes more sense. I'll have to learn to keep
my participation to questions only. I seem to know enough to get
it almost right. Which is perhaps worse than wrong.



Reply With Quote
  #4  
Old   
Ben C
 
Posts: n/a

Default Re: position: relative - 12-11-2007 , 02:27 AM



On 2007-12-11, salmobytes <Sandy.Pittendrigh (AT) gmail (DOT) com> wrote:
Quote:
On Dec 10, 3:30 pm, Ben C <spams... (AT) spam (DOT) eggs> wrote:
Almost. Relatively-positioned elements (block or not) have just the same
containing blocks as static ones-- i.e. just the nearest block ancestor.

It's only absolutely positioned ones whose CB is the nearest absolute or
fixed ancestor.

Ok. That makes more sense. I'll have to learn to keep
my participation to questions only. I seem to know enough to get
it almost right. Which is perhaps worse than wrong.
Don't worry about it. If you say something wrong then it might get
corrected and then it effectively might as well have been a question.
Better still perhaps one about something you didn't know you didn't
know.

The only difference is in the number of kickings you might receive, but
they are harmless fun you should ignore anyway.


Reply With Quote
  #5  
Old   
Jonathan N. Little
 
Posts: n/a

Default Re: position: relative - 12-11-2007 , 07:54 AM



Ben C wrote:
Quote:
On 2007-12-11, salmobytes <Sandy.Pittendrigh (AT) gmail (DOT) com> wrote:
On Dec 10, 3:30 pm, Ben C <spams... (AT) spam (DOT) eggs> wrote:
Almost. Relatively-positioned elements (block or not) have just the same
containing blocks as static ones-- i.e. just the nearest block ancestor.

It's only absolutely positioned ones whose CB is the nearest absolute or
fixed ancestor.
Ok. That makes more sense. I'll have to learn to keep
my participation to questions only. I seem to know enough to get
it almost right. Which is perhaps worse than wrong.

Don't worry about it. If you say something wrong then it might get
corrected and then it effectively might as well have been a question.
Better still perhaps one about something you didn't know you didn't
know.

The only difference is in the number of kickings you might receive, but
they are harmless fun you should ignore anyway.
Hey but you got to admit that for most of us the right-good-kicking is
an effective educational tool. You remember the lesson!

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com


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 - 2008, Jelsoft Enterprises Ltd.