SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Feb 2006
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need a static window

    Hey guys I hope you all could help me out.

    I need to create a javascript code that will take a div and always have it in the middle of the screen. Also I need it so when a user clicks a link (onclick I suppose) it will make the div display:none;

    thanks a bunch guys

  2. #2
    SitePoint Wizard
    Join Date
    Mar 2001
    Posts
    3,537
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This isn't a forum for free web programming services. So post the code you have so far and questions about specific problems you are having writing the code.

  3. #3
    SitePoint Member
    Join Date
    Feb 2006
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Alright will do.

    I have a div and a link at the bottom of the div which changes the div's style to display:none; via javascript.

    The problem is I can't find a way to keep the div in the middle of the screen.

  4. #4
    SitePoint Addict Mirek Komárek's Avatar
    Join Date
    Dec 2006
    Location
    Prague
    Posts
    210
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  5. #5
    SitePoint Member
    Join Date
    Feb 2006
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    those are great but in both cases when you scroll down the div stays in the same place at the top.

  6. #6
    SitePoint Addict Mirek Komárek's Avatar
    Join Date
    Dec 2006
    Location
    Prague
    Posts
    210
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So find some sources about css fixed, you will nedd some hack for ie lower then 7. http://tagsoup.com/cookbook/css/fixed/ http://www.cssplay.co.uk/layouts/fixed.html


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
  •