Jump to content

probs with positioning


amrita

Recommended Posts

I want to place a picture at a specific place on my page, so in css i use div to position it, however it does not place itself where i tell it to..what am i doing wrong or forgetting in the code? And also the background image is completely off in firefox - why?<code>body {margin: 0px;background-color: #000000;text-align: center;}#main {background-image: url(../images/baggrund.gif);background-repeat: no-repeat;width: 1024px;height: 768px;margin-left: -512px;margin-right: -512px;margin-top: 0px;text-align: center;}#picture {position: absolute;left: 300px;top: 219px;width: 649px;height: 316px;}</code>

Link to comment
Share on other sites

you set the body as margin:0; so the page is centered. But you use absolute positioning for your picture. Height attribute also does not work in CSS. With the background image, where do you want it? With that code it will sit in the top left corner...And whats with the minus margins?:)

Link to comment
Share on other sites

you set the body as margin:0; so the page is centered. But you use absolute positioning for your picture. Height attribute also does not work in CSS. With the background image, where do you want it? With that code it will sit in the top left corner...And whats with the minus margins?:)
I want the background to be centered on the page.. and it is in IE 6, but not in FF - i've used the minus margins before to center something - is that what's causing the problem? And I want the picture to be placed left: 300px; top: 219px; - but it isn't :-/
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...