dobaym
08-19-2008, 10:14 PM
Hello all,
I am having a problem with an img that I want to center.Its a very simple photo album.My problem is, if the Img is not absolutely positioned, than FF doesnt display it with height:100%.
#background is the img.
#btnr right button.
#btnl left button.
This is the css:
html,body{margin:0;padding:0;width:100%;height:100%;overflow:hidden;background-color:#666633;}
#background{ display:block; margin-left: auto; margin-right: auto; z-index:1; width:auto; height:100%; border: 0; padding: 0; visibility: visible;}
#btnl{ position: absolute; z-index:2; width:4%; height:auto; border: 0; padding: 0; visibility: visible; margin:0 1%;left:0; top:50%;}
#btnr{ position: absolute; z-index:2; width:4%; height:auto; border: 0; padding: 0; visibility: visible; margin:0 1%; right:0; top:50%;}
--------------------------------------------------------------
Please help if you can!
Thanks for your time!
Martin
I am having a problem with an img that I want to center.Its a very simple photo album.My problem is, if the Img is not absolutely positioned, than FF doesnt display it with height:100%.
#background is the img.
#btnr right button.
#btnl left button.
This is the css:
html,body{margin:0;padding:0;width:100%;height:100%;overflow:hidden;background-color:#666633;}
#background{ display:block; margin-left: auto; margin-right: auto; z-index:1; width:auto; height:100%; border: 0; padding: 0; visibility: visible;}
#btnl{ position: absolute; z-index:2; width:4%; height:auto; border: 0; padding: 0; visibility: visible; margin:0 1%;left:0; top:50%;}
#btnr{ position: absolute; z-index:2; width:4%; height:auto; border: 0; padding: 0; visibility: visible; margin:0 1%; right:0; top:50%;}
--------------------------------------------------------------
Please help if you can!
Thanks for your time!
Martin