Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > relative positioning with CSS

Reply
Thread Tools

relative positioning with CSS

 
 
Tom
Guest
Posts: n/a
 
      10-10-2003
Hi
I have a 2 column layout - white on one side and grey on the other.
I want to insert 2 further columns into the grey side as nested divs.
Is the positioning of the div relative to the div that it is nested within,
or to the page itself
For an example of what I am trying to achieve:
www.irishmx.com/demo.gif
Any thoughts welcomed
Thanks
T



 
Reply With Quote
 
 
 
 
m
Guest
Posts: n/a
 
      10-10-2003
Tom wrote:
> Hi
> I have a 2 column layout - white on one side and grey on the other.
> I want to insert 2 further columns into the grey side as nested divs.
> Is the positioning of the div relative to the div that it is nested within,
> or to the page itself
> For an example of what I am trying to achieve:
> www.irishmx.com/demo.gif
> Any thoughts welcomed
> Thanks
> T
>
>
>

The position of any object on your page, not just <divs> is
relative to the immediate containing element. The nesting can
be carried as deep as your visitor's sanity allows.



--
Cheers from m at http://www.mbstevens.com
via Pinguin and Dragon -- 0% Gatesbloat.

 
Reply With Quote
 
 
 
 
brucie
Guest
Posts: n/a
 
      10-10-2003
In post <bm6na9$ntc$(E-Mail Removed)>
Tom said...

> I have a 2 column layout - white on one side and grey on the other.
> I want to insert 2 further columns into the grey side as nested divs.


any particular reason why? a 3 col layout would be much more robust
and easier.

> For an example of what I am trying to achieve:
> http://www.irishmx.com/demo.gif


go for 3 cols

--
brucie.
11/October/2003 08:08:57 am
 
Reply With Quote
 
Toby A Inkster
Guest
Posts: n/a
 
      10-10-2003
Tom wrote:

> Is the positioning of the div relative to the div that it is nested within,
> or to the page itself


The position of a relatively positioned element is relative to where it
would have been placed if you didn't try to fiddle with its position.

OTOH, absolutely positioned elements are positioned relative to the top
left corner of their nearest non-statically positioned ancestor.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me - http://www.goddamn.co.uk/tobyink/?id=132

 
Reply With Quote
 
Tom
Guest
Posts: n/a
 
      10-13-2003
Thanks guys for the tips/advice.
>



 
Reply With Quote
 
 
 
Reply

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Css Positioning "Screen-Width-Relative" Rob Powell HTML 4 09-17-2006 09:09 PM
absolute, relative, not set, static positioning ?????? Rob R. Ainscough ASP .Net 2 02-07-2006 07:32 PM
CSS positioning : relative, fixed, absolute and liquid layouts KatB HTML 8 02-14-2005 11:37 PM
Relative CSS positioning Tim Johansson HTML 7 08-04-2004 12:33 AM
Positioning absolute CSS in a relative DIV Chris HTML 10 03-01-2004 05:04 PM



Advertisments