|
iluvatar -> RE: CSS question (7/29/2008 8:17:22 AM)
|
What exactly are you trying to center? The whole image on the page? If so, in your CSS, give the <div> "main" a fixed width and set its margin-left and margin-right properties to auto. Don't use text-align to center images. quote:
According to: http://w3schools.com/css/pr_class_position.asp a position:absolute is relative to its containing block, which I assumed would be the <div> under the <body> that encloses everything. Instead, the containing block seems to be the <body>. There's some weird stuff with position - it doesn't always work the way it's supposed to, particularly if you've got things nested inside each other. Try setting the containing block's position to relative and see what that does. Also, if you don't have the Firebug add-on for Firefox, get it. It's got an HTML browser that will show the html in one window w/ the page in the other. As you mouse-over different objects in the html (<div>'s, etc), it'll highlight them on the page. This comes in REALLY handy when you've got a lot of stuff you're trying to position. -Dan.
|
|
|
|