Results 1 to 5 of 5

Thread: Javascript and (div) help

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Posts
    7

    Question

    I have 2 scripts like this:
    <script language="JavaScript">
    function openWindow (url) {
    popUpWin = window.open(url,'blah','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable =0,width=510,height=520');

    if (navigator.appName == 'Netscape') {
    popUpWin.focus() ;
    }
    }
    </script>
    <a
    href="javascriptpenWindow('httpL//whatever')">
    Eric</a><br>

    on one page. The width and height are different, but when clicked, they are the same size. Any ideas?

    Also: I have 2 <div> tags, and I want them side by side. But one always appears below the other. How can I fix this?

    Thanks.

  2. #2
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    the width and height may be different but 510 and 520 are pretty close to each other.

    What do you mean by "when clicked, they are the same size"?


    as for you DIV problem, post what you've got so far and we'll sort it out for you.
    Mark
    -------------------

  3. #3

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Posts
    7
    I mean that, I have 2 of that JavaScript code on 1 page. The width and height are totally different for each seperate one. But, when I click one, it comes up as the size of the 2nd code chunk.
    I don't get it...

  4. #4

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Posts
    7

    Unhappy As for the <div>'s...

    <div style="background: blue; width: 150px;">
    <font color=white><b>blah</b></div>
    <div style="background: white; border: 1px solid black; width: 150px; position: absolute;">
    blah
    <div style="background: white; border: 1px solid black; width: 150px; position: absolute;">
    blah
    </div>
    </div>

    The appear above each other, like:
    <div1here>
    <div2here>
    <div3here>

    I want:

    <div1here>
    <div2here><div3here>

  5. #5
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    you just need to include left atributes to position them


    Code:
    <html>
    
    <body>
    
    <div style="background: blue; width: 150px;height:100;"> 
    <font color=white><b>blah</b>
    </div> 
    
    <div style="background: white; border: 1px solid black; width:150px;height:100; position: absolute;"> 
    blah 
    </div> 
    
    <div style="background: green; border: 1px solid black; width:150px;height:100; position: absolute; left=160"> 
    blah 
    </div> 
    
    
    </body> 
    </html>
    Mark
    -------------------

Posting Permissions

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



Click Here to Expand Forum to Full Width