1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Auto Size DIV Tag

Discussion in 'HTML & JavaScript' started by SharpEdge, Sep 19, 2008.

  1. SharpEdge

    SharpEdge BANNED BANNED

    Joined:
    Aug 16, 2008
    Messages:
    65
    Likes Received:
    12
    Looking for a code that auto sizes a div tag to 100% of the page/screen and scroll bars appear only if necessary.

    also needs to work with firefox and ie .. lol

    any ideas ? I haven't had any luck
     
  2. caretaker2007

    caretaker2007 Power Member

    Joined:
    Dec 20, 2007
    Messages:
    720
    Likes Received:
    454
    Occupation:
    To create income streams
    Location:
    In a 6 by 3 plot
    Home Page:
    I have used width or height : auto; for it. I set a min-width or min-height to go with it just by habit.
     
  3. SharpEdge

    SharpEdge BANNED BANNED

    Joined:
    Aug 16, 2008
    Messages:
    65
    Likes Received:
    12
    thanks for the reply

    min-heigh works with ff only i think?
     
  4. caretaker2007

    caretaker2007 Power Member

    Joined:
    Dec 20, 2007
    Messages:
    720
    Likes Received:
    454
    Occupation:
    To create income streams
    Location:
    In a 6 by 3 plot
    Home Page:
    Everything seems to look okay on my XP boxes, IE6 and IE7. IE still displays PNG files all screwed up, but that is a penalty IE users have to suffer through.
     
  5. KennWort

    KennWort Registered Member

    Joined:
    Apr 1, 2008
    Messages:
    68
    Likes Received:
    99
    Wow, that would be neat if it could be done with an iframe?
    Can it?

    KW
     
  6. Uncle Kracker

    Uncle Kracker Registered Member

    Joined:
    Sep 15, 2008
    Messages:
    89
    Likes Received:
    184
    Location:
    Detroit
    Her's an auto-adjust Iframe:

    Code:
    http://www.dynamicdrive.com/dynamicindex17/iframessi2.htm
     
    • Thanks Thanks x 1
  7. justthinking

    justthinking BANNED BANNED

    Joined:
    Aug 13, 2008
    Messages:
    475
    Likes Received:
    463
    Uncle Kracker: I can understand wanting to help another member out, but this was posted in Aug. Plus the member is banned. So who are you responding to? LOL
     
  8. Uncle Kracker

    Uncle Kracker Registered Member

    Joined:
    Sep 15, 2008
    Messages:
    89
    Likes Received:
    184
    Location:
    Detroit
    I was responding to KennWort who was wondering about an auto adjusting Iframe, the banned OP was wondering about DIV's. I was well aware that this was requested in August, thanks for your concern.
     
    • Thanks Thanks x 1
  9. KennWort

    KennWort Registered Member

    Joined:
    Apr 1, 2008
    Messages:
    68
    Likes Received:
    99
    I even forget what I wanted it for previously, but AWESOME find Uncle Kracker...

    KW
     
  10. Uncle Kracker

    Uncle Kracker Registered Member

    Joined:
    Sep 15, 2008
    Messages:
    89
    Likes Received:
    184
    Location:
    Detroit
    Yeah, I know how that goes... :p