Member
From: South Africa, Port Elizabeth
Registered: 2006-08-23
Posts: 1891
I've been thanked 34 times.
Offline
In full form, i will be a sheep here and ask: how do we feel about absolute positioning on webpages? Or more to the point, as many of you know (through my whinging), my new Lalibela site is nearing its arrival and i am still trying to find the perfect way of achieving my layout... at this point, absolute positioning seems to be the most formidable option, especially considering i can get my content right to the top of my code.
But... its to good to be true im sure, so what are the major flaws im missing? in which cheerful way will the chair be pulled from beneath me? 
My up and coming... soon to be real website... www.thewebguy.co.za (one day i will finish it
)Moderator
From: Yorkshire, UK
Registered: 2006-08-19
Posts: 2793
I've been thanked 77 times.
Offline
absolute positioning can break the layout in un-anticipated browser sizes
only top and left are recognised forms of AP. The is no right
I'm with Northie -- but, out of curiosity, are you going to place a Doctype Declaration at the top of your code? 
Administrator
From: Colorado, USA
Registered: 2006-02-15
Posts: 2228
I've been thanked 95 times.
Offline
uh oh,
Usually I agree with Northie, this time I have to disagree.
I use absolute positioning and have no problems with site display. Believe the key here is, as TA says the DTD is important.
You can use left or right.
Attention designers and webmasters - "The Beauty of CSS"
Valid Web Designs tutorials on HTML, XHTML and CSS
Home Security Systems
CE is right -- I was only on my 1st cup of coffee when I read Northie's response... 
Yes, absolute positioning has no problem at all. However, you will need to verify your page in more browsers especially safari and IE6 and below. Remeber too that absolute positionig an be easily controlled, as W3c puts it, the element inherits positioning from the parent element. If you have a div within a div, it will absolutely position itself within the parent div.
Member
From: South Africa, Port Elizabeth
Registered: 2006-08-23
Posts: 1891
I've been thanked 34 times.
Offline
Cool, i will take the unanimous vote of "cool beans" - not sure what you mean by the DTD though? isnt it always at the top?
When im working with absolute positioning ive come to only use the margin-top and margin-left tags with the z-index tag to do most of my arranging and plotting, so i should be okay as far as bottom and right go. Apparently my biggest nipper will be making sure there are no spaces in my css, this makes firefox edgy and causes some... peculiar glitches.
Thanks guys
My up and coming... soon to be real website... www.thewebguy.co.za (one day i will finish it
)Moderator
From: Yorkshire, UK
Registered: 2006-08-19
Posts: 2793
I've been thanked 77 times.
Offline
regardless of your doc-type, FF ~1 gets absolute and relative the wrong way round
It will break.
Don't get me wrong, AP has it's uses - just not very many!
If you're trying to make a source ordered layout, try floating divs and get used to working with margins
Member
From: South Africa, Port Elizabeth
Registered: 2006-08-23
Posts: 1891
I've been thanked 34 times.
Offline
I know my way around margins fairly well, its the floating divs that get me worked up, by the end of it, it never really seems to fit the way i wanted it to.. allas, cant argue with the pros on this, i willl see if i can muster up a decent page.
Shot
My up and coming... soon to be real website... www.thewebguy.co.za (one day i will finish it
)Moderator
From: Yorkshire, UK
Registered: 2006-08-19
Posts: 2793
I've been thanked 77 times.
Offline
this comprehensive fixed 3-col layout is a good starting point.
taught me a lot
the css even comes fully commented
http://www.positioniseverything.net/piefecta-rigid.html
Member
From: South Africa, Port Elizabeth
Registered: 2006-08-23
Posts: 1891
I've been thanked 34 times.
Offline
Nice
thanks Northie, ive been through tons of these three column layouts, and lots of them arent all that malleable, for example, i tend to end up with unwanted spaces... so i set a negative margin, which causes things to misalign ect... hopefully this one isnt one of em, thanks 
My up and coming... soon to be real website... www.thewebguy.co.za (one day i will finish it
)Ryan_steyn wrote:
not sure what you mean by the DTD though? isnt it always at the top?
Yes it is -- but you have to put it there yourself.
Ryan -- here's a few more sites for you to study, as they have alot of useful info that you might want to bookmark...
CSS Positioning in Ten Steps
Intro To Absolute Positioning
W3C Library Of CSS Positioning
W3C CSS Position Properties
Member
From: South Africa, Port Elizabeth
Registered: 2006-08-23
Posts: 1891
I've been thanked 34 times.
Offline
Ooh, cool, thanks TA... 
My up and coming... soon to be real website... www.thewebguy.co.za (one day i will finish it
)| Never |


