SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Addict djh's Avatar
    Join Date
    Apr 2000
    Location
    Long Beach, CA
    Posts
    333
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Set width of a spacer by getting size of window

    (Have I mentioned that I simply hate netscape?)

    Anyone know how to automatically resize a spacer or any image for that matter, particularly the width?

    I need the get the size of the window that the page is being displayed, subtract 300px and set the spacer width equal to that number...

    Any ideas?

  2. #2
    SitePoint Guru Vincent Puglia's Avatar
    Join Date
    Feb 2000
    Location
    where the World once stood
    Posts
    700
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi

    Did you try :

    var winWidth = (document.all) ? document.body.clientWidth: window.innerWidth :

    Note: since document.all uses 'body' within the DOM, the page needs to be at least partially loaded.

    Vinny
    Where the World Once Stood
    the blades of grass
    cut me still


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
  •