Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 10 of 10
  1. #1
    Regular Coder
    Join Date
    Oct 2007
    Posts
    277
    Thanks
    2
    Thanked 4 Times in 4 Posts

    IE 6 position absolute height problem

    When I set position to absolute in IE 6 the height turns to 0 if it's set to auto.
    I have this css for the div:
    Code:
    .desktop{
    overflow:hidden;
    cursor:default;
    width:100%;
    position:absolute;
    top:0;
    left:0;
    right:0;
    bottom:31px;
    height:auto;
    }
    I can't set the height to 100% because I want it 31 pixels from the bottom.

    here's the page:
    http://shedokan.110mb.com/os/

    there must be a solution.
    Last edited by shedokan; 04-08-2009 at 07:17 PM.

  • #2
    New Coder
    Join Date
    Mar 2009
    Posts
    28
    Thanks
    3
    Thanked 4 Times in 4 Posts
    You can't set the height at 31px?

  • #3
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,863
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    Get rid of all overflow:hidden; and see what happens.
    btw, can't you avoid the use of absolute position for the container (.desktop)?
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #4
    Regular Coder
    Join Date
    Oct 2007
    Posts
    277
    Thanks
    2
    Thanked 4 Times in 4 Posts
    F-b0mb:
    No, I can not set the height to 31px because I want it to be .screen height-31px so i need to push it from the bottom.

    abduraooft:
    I got rid from all of the overflow:hidden from all the elments from .desktop to the html tag and it doesn't change a thing.

    and I have to use position:absolute to make it full page height and width-31px.

  • #5
    Senior Coder timgolding's Avatar
    Join Date
    Aug 2006
    Location
    Southampton
    Posts
    1,519
    Thanks
    114
    Thanked 110 Times in 109 Posts
    Maybe try leaving the desktop at 100%. then use position relative to bump the task bar up

    CSS
    Code:
    .taskbar
    {
       position:relative;
       top:-31px;
    }
    You can not say you know how to do something, until you can teach it to someone else.

  • #6
    Regular Coder
    Join Date
    Oct 2007
    Posts
    277
    Thanks
    2
    Thanked 4 Times in 4 Posts
    I tried using IE8.js(http://ie7-js.googlecode.com/) and it fixed the position absolute problem.
    but this isn't a solution. because I have more troubles where i use position absolute for the height to push it from the top or bottom, and IE8.js doesn't fix them.

    so if a solution for this is found it will help fixing other problems too.

    *edit*
    timgolding:
    The problem here is that I need it to be 31px from the bottom I can't do it in any other way.
    Last edited by shedokan; 04-08-2009 at 09:52 AM.

  • #7
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello shedokan,
    Does this work? http://nopeople.com/test/shedokanOS.html
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #8
    Regular Coder
    Join Date
    Oct 2007
    Posts
    277
    Thanks
    2
    Thanked 4 Times in 4 Posts
    Quote Originally Posted by Excavator View Post
    Hello shedokan,
    Does this work? http://nopeople.com/test/shedokanOS.html
    that works but i your code you don't have the .desktop div.
    and I need it for a mousedown event so users can select items.

  • #9
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Can't you use a regular CSS rollover? Hate that onMouse stuff. Have a look at a rollover example - http://nopeople.com/CSS/CSS_rollover/index.html
    That's a 3 state rollover in the demo but you can easily adapt your buttons to it and make it only 2 states (normal and hovered).

    Or you can add your .desktop
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #10
    Regular Coder
    Join Date
    Oct 2007
    Posts
    277
    Thanks
    2
    Thanked 4 Times in 4 Posts
    did you even try to double click on folders drag files and stuff like that?
    this is an online operating system I'm making so css can't help me select items and move them.

    thanks for trying, but I got it fixed with a css expression even though I don't like it.

    let's face it there are not enough fixes for all of IE's bugs...

    PS. you can remove the page now because your'e wasting my hosting's resources


  •  

    Posting Permissions

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