Results 1 to 7 of 7

Thread: Absolute centered block

  1. #1
    Join Date
    Aug 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Absolute centered block

    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

  2. #2
    Join Date
    Jan 2006
    Location
    Ft. Smith, AR
    Posts
    795
    Thanks
    57
    Thanked 129 Times in 116 Posts

    Default

    Please post a link to the page on your site that contains the problematic script so we can check it out.
    --------------------------------------------------
    Reviews, Interviews, Tutorials, and STUFF
    --------------------------------------------------
    Home of the SexyBookmarks WordPress plugin

  3. #3
    Join Date
    Aug 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thats not possible at the moment, because its only in the making, and hasnt been uploaded yet.

  4. #4
    Join Date
    Aug 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Is there any info missing that would help you understand the problem better?

  5. #5
    Join Date
    Jan 2006
    Location
    Ft. Smith, AR
    Posts
    795
    Thanks
    57
    Thanked 129 Times in 116 Posts

    Default

    well at the very least, we need to see more than just the CSS to determine what the problem is. We'll need to see how it's implemented (the HTML) as well.
    --------------------------------------------------
    Reviews, Interviews, Tutorials, and STUFF
    --------------------------------------------------
    Home of the SexyBookmarks WordPress plugin

  6. #6
    Join Date
    Aug 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Here you go:

    <body>

    <div>
    <a href="O1.html"><img id="btnl" src="BTNL.gif" alt=""width="43" height="44" border="0" ></div>


    <div>
    <a href="O3.html"><img id="btnr" src="BTNR.gif" alt=""width="43" height="44" border="0" ></a></div>


    <div>
    <img id="background" src="O2b.jpg" alt=""width="867" height="650" border="0" align="center"></div>



    </body>

  7. #7
    Join Date
    Aug 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Sorry but I have to go to bed, its 1:15 am in Hungary right now, and I am very tired.
    So if you have any suggestion for the things above, than please post it and I will check up on it tomorrow!
    Thank you very much for your help and patience!

    Good evening

    Martin

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •