SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  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)

    Figure out the size of the window and position a div layer relative to widow size

    hey i need some serious bail out help...

    i'm working on a site that floats middle, i.e., everything is centered on page. so when the window is resized the main table is still in the center of the page.

    what i want to do is have a div layer be positioned relative to the window size, so that it will always line up with the table that is centered (relatively of course) on the page.

    if you have any ideas, please help!! some code would be great...

  2. #2
    What? Maelstrom's Avatar
    Join Date
    Oct 2001
    Location
    Whistler BC originally from Guelph Ontario
    Posts
    2,175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You want a layer that is centered. Over top of the table? I am trying to conceptualize what you are asking and can't quite get it.

    For Centering a div try this

    <div style="margin: auto"></div>

    Then just make it the size you want and it will be centerred
    Maelstrom Personal - Apparition Visions
    Development - PhP || Mysql || Zend || Devshed
    Unix - FreeBSD || FreeBsdForums || Man Pages
    They made me a sitepoint Mentor - Feel free to PM me or Email me and I will see if I can help.

  3. #3
    SitePoint Addict djh's Avatar
    Join Date
    Apr 2000
    Location
    Long Beach, CA
    Posts
    333
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's the site i'm working on:

    http://tsabrand.com/apparel/

    select a clothing type... i want to load the photos into layers so that the secondary menu on the left turns the visibility of that layer to visible.

    my problem is i don't know how to position those layers relatively.

    i'll try your fix maelstrom but i don't think that's going to give me the precise positioning i need...

  4. #4
    What? Maelstrom's Avatar
    Join Date
    Oct 2001
    Location
    Whistler BC originally from Guelph Ontario
    Posts
    2,175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by djh
    Here's the site i'm working on:

    http://tsabrand.com/apparel/

    select a clothing type... i want to load the photos into layers so that the secondary menu on the left turns the visibility of that layer to visible.

    my problem is i don't know how to position those layers relatively.

    i'll try your fix maelstrom but i don't think that's going to give me the precise positioning i need...
    Ok, I am going to suggest something a little different just because it produce the same affect but be faster ...change it to a rollover with preloaded images. Here is the pseudo code

    I notice you are using a server side language so

    load the pics you want into javascript image object
    (this preloads the pictures)
    create the rollover onclick when someone clicks the side link.
    it will dynamically change the side picture without needing a reload and the picture will be in exactly the same spot

    http://www.sitepointforums.com/showt...threadid=30006

    That is how to do the rollover (obviously you want to make it onclick on the links). If you still want to do it the other way I will continue to help out because there are many ways to pull this off.
    Maelstrom Personal - Apparition Visions
    Development - PhP || Mysql || Zend || Devshed
    Unix - FreeBSD || FreeBsdForums || Man Pages
    They made me a sitepoint Mentor - Feel free to PM me or Email me and I will see if I can help.

  5. #5
    SitePoint Addict djh's Avatar
    Join Date
    Apr 2000
    Location
    Long Beach, CA
    Posts
    333
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yeah, i thought of that too. let me play with it a little bit and if it doesn't work out, i'll post another message. or either way, i'll post how it turns out. thanks!

  6. #6
    ********* obeah makeda's Avatar
    Join Date
    Jun 2001
    Location
    rollin' on dubs
    Posts
    492
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i agree with maelstrom, preloading the images would greatly enhance performance.

    djh, have you met any of those skaters? I'd love to get muska to sign my TonyHawk ProSkater games!

  7. #7
    SitePoint Addict djh's Avatar
    Join Date
    Apr 2000
    Location
    Long Beach, CA
    Posts
    333
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    that's pretty funny. i have his cell number but sorry man...

    hey is muska a character on that game?

  8. #8
    What? Maelstrom's Avatar
    Join Date
    Oct 2001
    Location
    Whistler BC originally from Guelph Ontario
    Posts
    2,175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by djh
    yeah, i thought of that too. let me play with it a little bit and if it doesn't work out, i'll post another message. or either way, i'll post how it turns out. thanks!
    The layers will turn out fine too. I will give you a hint if you wanna go with the layer idea. Use innerHTML to change it over. That still means preloading the images but instead of having 40 layers )exagerating) you would have 1 where the HTML within the layer would change depending on the link they hit.
    Maelstrom Personal - Apparition Visions
    Development - PhP || Mysql || Zend || Devshed
    Unix - FreeBSD || FreeBsdForums || Man Pages
    They made me a sitepoint Mentor - Feel free to PM me or Email me and I will see if I can help.

  9. #9
    SitePoint Addict djh's Avatar
    Join Date
    Apr 2000
    Location
    Long Beach, CA
    Posts
    333
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    think i'll try to go cross platform first...

  10. #10
    ********* obeah makeda's Avatar
    Join Date
    Jun 2001
    Location
    rollin' on dubs
    Posts
    492
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i've got thps2x for xbox and i'm pretty sure he's on it. i could be confused, though...could have been thrasher.


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
  •