SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2012
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Just with css and html, can I use Nav bar links to bring a page on top of a page

    I think I have see this before but cannot find examples to refer to. Instead of having a nav link open a full new page, can I have a page slide up from the bottom of the screen, about 2/3 up so the header and nav links still show, but the information on the second page would "show" on that first page (and be able to be clicked off, or replaced in the same way by clicking on another link in the nav bar?

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,296
    Mentioned
    460 Post(s)
    Tagged
    8 Thread(s)
    This is really a JS question, as you won't get this with CSS alone. But before going down this route, remember that it will probably be tricky for a lot of people (for physical or device reasons) to navigate pages like that.

    Would you like this moved to the JS forum?

  3. #3
    Community Advisor silver trophybronze trophy
    dresden_phoenix's Avatar
    Join Date
    Jun 2008
    Location
    Madison, WI
    Posts
    2,813
    Mentioned
    34 Post(s)
    Tagged
    2 Thread(s)
    Simple answer 'not really'.
    Better answer .. it's not really worth it.


    Explanation:
    If you need an EXTERNAL DOCUMENT to load the answer is 'no'. Simply because CSS affect s ONLY the loaded document... in other words page 1 and page two would need to be ONE HTML DOCUMENT to even consider the effect [at this point you should ask yourself why do i want to relly on CSS for this at the cost of making the end user lad x-number of pages he/she may never look at ]. Other wise you will need PHP and AJAX to make the sever request onclick( which is .js, btw).

    If you mean that you want an effect the scroller to move down to the second page document ( then am not sure but) I think you will need .js. For the nav you can use position:fixed; so that it will stay at that position on the screen.


    If you simply want controlled movement, have fixed dimensions dont mind limited browsers support then you can use CSS3 and transitions to do so. Another limitation is that anytime the user clicks on anything else your effect will literally collapse since the :target will shift. If your page has limited functionality this wont be much of an issue.


    just some things to consider.

    I hope that helps .

  4. #4
    SitePoint Enthusiast
    Join Date
    May 2012
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Don't bother to move it, thanks, ralph. I don't know js. And for the reasons you and dreseden-phoenix give, it is not something I will pursue. I appreciate the replies!


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
  •