|
Tailslide -> RE: Centering Container (5/23/2006 2:56:53)
|
You'll forgive me if I've not got this quite right as, frankly a lot of the technicalities are waaay over my head. Anyway, my understanding is that the issue is with (X)HTML rather than specifically CSS - it's just if you don't use tables for layout then it's something you will come across. The issue (again as I understand it) is that the HTML page sees itself as endless and the browser viewport is just looking at a part of that page. This is why if you try using relative or normal positioning as you would normally with CSS divs, you run into trouble as the div has nothing to measure it's centre from (the page being endless). You can get around this by using absolute positioning (which removes elements completely from the normal flow of the document) and negative margins or scripting (as with scripting you can deal with the viewport itself) or tables - but it's not possible, far as I know, to deal with it using nice, simple "normal" positioning. As to why the HTML page can obviously "see" it's horizontal boundaries and not it's vertical ones - who knows. The problem is compounded by the fact that different browsers react differently to the various ways round the issue (well they would - it was never a standard in the first place).
|
|
|
|