Absolute Positioning in CSS

I built my entire page, as some of you have seen at <!-- m --><a class="postlink" href="http://www.xdemi.com/music/main.php">http://www.xdemi.com/music/main.php</a><!-- m --> based on absolute positioning and specifying exactly how many pixels off the screen it was and stuff like that.<br />
<br />
I want to grab my layout right now, and do something so it stays exactly the same, except that it's all positioned in the center of the page. I don't know how to center without using CSS "text-align" and I think my absolute positioning will screw things up.<!--content-->centering is difficult to do well in CSS. that's all i can say. i've heard of people using negative margins to great effect though, but i've never tried it personally.<!--content-->i won't bother to center then.<br />
<br />
i remember a long time ago i asked about centering. and i got so confused.<!--content-->hehe, to confirm your own pondering, your absolute positioning will screw things up in that you cannot center something and have it relatively or absolutely positioned.<br />
I have no problems in centering stuff with css though ;)<!--content-->i have a question then<br />
<br />
let's say i have a div that contains everything and is set with an absolute position<br />
<br />
and there are things inside using absolute position<br />
<br />
do the things inside position counting from WITHIN the div or still at the corner of the browser screen?<!--content-->corner of the screen :)<!--content-->oh poo :(<br />
<br />
<br />
does anyone see what i'm trying to do? lol - my site is meticulously aligned to the pixel - everything is exactly where i want it. i want to somehow move it exactly the way it is, to the center.<br />
<br />
i'm looking for some miracle tag/css thing that'll just move it.<!--content-->Originally posted by pyrexyn <br />
i have a question then<br />
<br />
let's say i have a div that contains everything and is set with an absolute position<br />
<br />
and there are things inside using absolute position<br />
<br />
do the things inside position counting from WITHIN the div or still at the corner of the browser screen? <br />
<br />
absolute positioning starts at position 0,0 the upper left corner of the screen. Relative positioning will start from where the element would normally be positioned in the flow of the page.<!--content-->how do you get it to start from the top-left corner of a certain element, like a div?<!--content-->
 
Back
Top