Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,472
There are 1729 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     HTML/XHTML/DHTML/CSS :

CSS: Absolute and Relative Positioning?

Thread title: CSS: Absolute and Relative Positioning?
Closed Thread    
    Thread tools Search this thread Display Modes  
09-10-2005, 07:11 PM
#1
Yang is offline Yang
Yang's Avatar
Status: Member
Join date: Jun 2005
Location:
Expertise:
Software:
 
Posts: 460
iTrader: 0 / 0%
 

Yang is on a distinguished road

Send a message via Yahoo to Yang

  Old  CSS: Absolute and Relative Positioning?

Hey it's me again with yet, another CSS question. My CSS studies are going fine( ), but I'm not quite sure what Relative and Absolute positioning are. From reading some articles on the web, they're quite tricky to understand. Can anyone explain to me what they do, their difference, and why I need them? Thanks again!

09-10-2005, 07:34 PM
#2
Koobi is offline Koobi
Koobi's Avatar
Status: Member
Join date: Apr 2005
Location:
Expertise:
Software:
 
Posts: 312
iTrader: 0 / 0%
 

Koobi is on a distinguished road

  Old

as far as i know, relative positioning is how an element is positioned relative to a block level element

and absolute positioning is when an element is positioned relative to 0, 0 on the X, Y axis respectively (0, 0 being the top leftmost position in the coordinate graph)

09-10-2005, 07:59 PM
#3
AlexK is offline AlexK
AlexK's Avatar
Status: Request a custom title
Join date: Aug 2005
Location: Copenhagen
Expertise:
Software:
 
Posts: 1,691
iTrader: 0 / 0%
 

AlexK is on a distinguished road

Send a message via MSN to AlexK

  Old

Originally Posted by Koobi
as far as i know, relative positioning is how an element is positioned relative to a block level element

and absolute positioning is when an element is positioned relative to 0, 0 on the X, Y axis respectively (0, 0 being the top leftmost position in the coordinate graph)

09-11-2005, 04:41 AM
#4
Julian is offline Julian
Status: Simply to simplify
Join date: Apr 2005
Location: Foxton, Manawatu, New Zealand
Expertise:
Software:
 
Posts: 5,572
iTrader: 0 / 0%
 

Julian is on a distinguished road

  Old

Relative is the positioning inside the container that holds the element. You can have negative values for relative.

Absolute is the positioning out of context of the rest of the page, it will sit on top of everything else and positions itself according to the top left of the page.

09-12-2005, 10:27 AM
#5
Salathe is offline Salathe
Salathe's Avatar
Status: Community Archaeologist
Join date: Jul 2004
Location: Scotland
Expertise: Software Development
Software: vim, PHP
 
Posts: 3,820
iTrader: 25 / 100%
 

Salathe will become famous soon enough

Send a message via MSN to Salathe

  Old

Originally Posted by Julian
... and positions itself according to the top left of the page.
Or, the 'nearest positioned ancestor'. If a containing element is positioned using relative then the zero co-ordinates will be taken from the top and left of that element.

Generally, people new to this (or for simplicity) don't often position things all too much so the 'nearest positioned ancestor' is the document itself (body element) which is what Julian was referring to.

09-12-2005, 11:01 PM
#6
<Isurfr> is offline <Isurfr>
Status: Member
Join date: Aug 2005
Location: w3c
Expertise:
Software:
 
Posts: 193
iTrader: 0 / 0%
 

<Isurfr> is on a distinguished road

  Old

...

09-13-2005, 12:03 AM
#7
Yang is offline Yang
Yang's Avatar
Status: Member
Join date: Jun 2005
Location:
Expertise:
Software:
 
Posts: 460
iTrader: 0 / 0%
 

Yang is on a distinguished road

Send a message via Yahoo to Yang

  Old

Hey, thanks for all of your replies. I understand the general difference I'll do more reading on them, and they're making sense now You guys are great.

Closed Thread    


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed