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 2 of 2

Thread: Height Trouble!

  1. #1
    Regular Coder
    Join Date
    Jul 2002
    Location
    51 03' -78" N -114 05' 72" W
    Posts
    617
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Height Trouble!

    Wasnt sure where to post this so I posted it in both sections! I apologize for the double post!

    I want to use a Javascript to dynamically change the height of this div statement

    <div id=DWelcome style='position:absolute; visibility:hidden; font-family:arial; font-size:10pt; width: 450; height: 250; Z-Index: 1; clip:rect(0,450,250,0); background-color:#CCCCCC; layer-background-color:#CCCCCC'>
    <P Align=Center>
    <b>Welcome</b><BR>
    </P>
    </div>

    I figured something like this would work

    <script>
    function h(){
    if(document.body.width=600){250}
    if(document.body.width=768){350}
    }
    </script>

    and the do the following
    <div id=DWelcome style='position:absolute; visibility:hidden; font-family:arial; font-size:10pt; width: 450; height: h(); Z-Index: 1; clip:rect(0,450,h(),0); background-color:#CCCCCC; layer-background-color:#CCCCCC'>
    <P Align=Center>
    <b>Welcome</b><BR>
    </P>
    </div>

    but it doesnt work!

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The other thread is at Height Trouble!
    "Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark


  •  

    Posting Permissions

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