0

I have a responsive online auction site with each item set up as a series of divs within a wrapper div. Each item div looks as follows:

<div id="item_block54510" style="display: inline-block; margin: 6px; background-color: #fff; width: 296px; border-bottom: 1pt solid; font-size: 12pt;">

If someone is outbid, they are sent an email with a link to go back to this item so they can increase their bid, which looks like this:

domain/online_sale_page.php?cid=1873#item_block54510

However, when the link is clicked on in the email, the website does not scroll to that item. It goes to items near there but not to that item. Any suggestions?

firpo
  • 43
  • 8
  • what is the logic on the PHP side that handles the query? Without seeing that we are not even sure how its getting that close. You might consider using an anchor tag in the html since that is what they are for. – happymacarts Sep 11 '16 at 18:19
  • maybe it is because the width of the screen is different in email have you the same result if you resize the page ? – bormat Sep 11 '16 at 18:56
  • @happymacarts, anchor with name and div with id behave the same when talking about `#links` [check here](http://stackoverflow.com/questions/484719/html-anchors-with-name-or-id) – Dekel Sep 11 '16 at 18:57
  • @firpo, do you have some navigation menu on the page that add/remove elements from the page while you scroll? – Dekel Sep 11 '16 at 18:57
  • As @happymacarts said, anchor tags with name and div with id are the same for this type of behaviour. No other navigation is required other than the link from the email. The php query is not relevant because whatever the content is that fits within the div, when someone clicks on the link in the email, it should go to that div as specified by #item_blocks54510. – firpo Sep 11 '16 at 19:13
  • Sorry, meant as @dekel said... – firpo Sep 11 '16 at 19:14
  • It seems predictable. I use lazyloading of images. All div blocks are set up in the container div from the onset however pictures only download as user scrolls. Regardless of window size, the first time link in email is clicked or if I do shift+refresh, it positions the desired block in the row just under the fold of the bottom of the wrapper div so it is not visible until I scroll up, instead of being the first row which is visible. Subsequent refreshes seem to put it in the first visible row. I could do an additional scrollby but values would be different based on different sizes of windows – firpo Sep 11 '16 at 19:37

0 Answers0