Jump to content

How Do I Move a Page down automatically


tecmeister

Recommended Posts

Hi guys,

 

The title of my question problem seems a bit confusing, so I'll try and explain it to the best of my ability.

 

I'm trying to make my web site move down to the news that they have selected on in the home page.  Rather than always start at the top and have to move down there self.

How do I do so?

 

Thanks,

 

tecmeister.

Link to comment
Share on other sites

make the link they click on the homepage an id link.. well thats what I call it idk what the real world calls it:

 

for example:

 

<a href="news.php#theNewsElementId">The News Element Name</a>

 

then when they go to that page thru that link.. the page will drag the browser's client area down to where it is visible within the client area.. it will drag to the element with similar html to this:

 

<h1 id="theNewsElementId">The News Element Name</h1>

Link to comment
Share on other sites

RussellReal is right

 

it goes to the target id if the person clicks on it but if you open the news.php page first it will not work

 

 

for this you will have to automatically redirect your user to the target heading or link.

 

use this

<?php
echo"<meta http-equiv='REFRESH' content='0;url=news.php#theNewsElementId'>";
?>

page content

<h1 id="theNewsElementId">The News Element Name</h1>

news started here

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.