Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Back A Page

Options
  • 09-10-2007 6:48pm
    #1
    Closed Accounts Posts: 388 ✭✭


    On some sites they have like a little hyperlink at the bottom left or right saying something like "Back a Page", and it always stays in that position dispite the resolution of the monitor..

    Does anyone know the code for that please? im having trouble on how to describe it in google..
    its for ict homework (:

    thanks.


Comments

  • Registered Users Posts: 7,739 ✭✭✭mneylon


    It's probably using the javascript history function:
    <a href="javascript:history.go(-1)">back</a>
    


  • Closed Accounts Posts: 388 ✭✭Troublesome


    Thats the one, cheers mate,
    how do i position at the bottom left now and for it to stay there, dispite screen resolution, if you get me?


  • Registered Users Posts: 706 ✭✭✭DJB


    That'll all depend on your design and you can use css to do it. If you post up your page, it shouldn't be too difficult to do. Off the top of my head, put this after your content:

    <div id="goBack"><a href="javascript:history.go(-1)">back</a></div>

    Then in your style sheet, specify the following:

    div#goBack { float: right; margin: 2px 20px 2px 0; }

    Play around with those style settings and you should get it to where you want.

    Rgds, Dave


  • Registered Users Posts: 8,488 ✭✭✭Goodshape


    You could use position : fixed; or position : absolute; in your style sheet to either fix it to the screen (despite scrolling) or just put it at a specific location on the page (which will scroll away naturally).

    div#goBack { position : fixed; bottom : 10px; left : 10px; }


  • Closed Accounts Posts: 17,208 ✭✭✭✭aidan_walsh


    Or, better again, let the browser handle browser functions. Unless of course you have good reason not to.


  • Advertisement
Advertisement