how to scroll with CSS

Discussion in 'CSS' started by ludwig, Oct 29, 2006.

  1. #1
    Hi guys,

    I have www.mobile.am
    I have the brands in the left, but when you click on lets say NOKIA, on the next page you still need to scroll to NOKIA to see it, How can I automatically scroll the DIV to NOKIA?

    Thanks in advance
     
    ludwig, Oct 29, 2006 IP
  2. Pat Gael

    Pat Gael Banned

    Messages:
    1,331
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Pat Gael, Oct 29, 2006 IP
  3. ludwig

    ludwig Notable Member

    Messages:
    2,253
    Likes Received:
    66
    Best Answers:
    0
    Trophy Points:
    225
    #3

    Attached Files:

    ludwig, Oct 29, 2006 IP
  4. Eskarina

    Eskarina Guest

    Messages:
    608
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #4
    If you're into mobile phones (which I'm definitely NOT! & only keep because they are s'posed to be a thoughtful luxury xmas or birthday presents!) (despite the fact that everyone knows I hate their existence!) .... that was a really nice looking site.

    Loaded quick and attracted my longer term attention.

    Sorry ... what was your problem ?

    Where would we be without mobiles?
     
    Eskarina, Oct 29, 2006 IP
  5. ludwig

    ludwig Notable Member

    Messages:
    2,253
    Likes Received:
    66
    Best Answers:
    0
    Trophy Points:
    225
    #5
    Thanks for comments
    My problem is indicated above
    We'd be lost without them, and we would have lost a lot of time on doing something, while with a mobile you can do business on the fly
     
    ludwig, Oct 29, 2006 IP
  6. JEET

    JEET Notable Member

    Messages:
    3,832
    Likes Received:
    502
    Best Answers:
    19
    Trophy Points:
    265
    #6
    Hi,
    I found this on your site:
    href="?lang=en&brand=BenQ"
    So I assume that you are making pages using some scripting language.
    Instead of trying to scroll down to the desired link on the target page, why not print the link on top of the navigation list?
    So if I click the BENQ link, <a href="?lang=en&brand=BenQ">BenQ</a> can be printed using the scriptting language, above all links in the menu.
    Hope I understood you right.
    Bye :)
     
    JEET, Oct 30, 2006 IP
  7. ludwig

    ludwig Notable Member

    Messages:
    2,253
    Likes Received:
    66
    Best Answers:
    0
    Trophy Points:
    225
    #7
    thanks JEET

    Yes I use ASP and all the data is in a MsSQL database. I can do that, that's an option, but for instance your next step is choosing the series of the specific brand and you wanna see lets say all K series of Sony Ericsson, you will need to scroll down to K everytime you are browsing a new phone. So that makes it a bit hard.

    My only concern is that I wanna make it more user friengly, like you want to find something, you look at the page and its there. you need this, its here.

    Looking to the stats of that website I see that 60+% of the unique visitors add this site to their favorites. I wanna have it easy navigatable :)

    So I guess there is no other chance than having that on top.

    Well I also can calculate the heights of the whole brands section, is it possible to move the scrollbar let's say 100 down from the top?

    Regards
    Ludwig
     
    ludwig, Oct 30, 2006 IP
  8. Tiki

    Tiki Peon

    Messages:
    15
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Here's a suggestion, download jQuery and the Interface FX extension (you can just choose the "scrollTo" interface effect.

    http://www.jquery.com
    http://interface.eyecon.ro/download

    Include the JS files, give each link a brand ID (<a id="brand" href="">) and do something like this:

    
    <?php
       if(isset($_GET['brand'])) {
    ?>
       <script type="text/javascript">
           $("div#menu a#" + <?php echo $_GET['brand']; ?>).scrollTo(800);
       </script>
    <?php
       }
    ?>
    
    Code (markup):
     
    Tiki, Oct 30, 2006 IP
    ludwig likes this.
  9. ludwig

    ludwig Notable Member

    Messages:
    2,253
    Likes Received:
    66
    Best Answers:
    0
    Trophy Points:
    225
    #9
    thanks Tiki

    I thinks that's what I need, I will have to spend some time on it also

    I just greened you, there are great tools on that site :)
     
    ludwig, Oct 31, 2006 IP
  10. fordP

    fordP Peon

    Messages:
    548
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Alternatively, you can just link to the nokia page with the target="" set to "#nokia" and then where you have nokia on the left, put

    <a name="Nokia" id="Nokia"></a> right before where Nokia is bolded out

    What I'm saying is use anchor points and then link to those anchor points. Been awhile since I have linked to anchor points so I may be telling you how to do it in the wrong way, but a couple seconds on google and you should be able to discover the proper way


    Actually, on the nokia page, you would set the IFRAMES target to nokia
     
    fordP, Oct 31, 2006 IP
  11. ludwig

    ludwig Notable Member

    Messages:
    2,253
    Likes Received:
    66
    Best Answers:
    0
    Trophy Points:
    225
    #11
    actually I don't have iframes there, its just DIVs and it is in the content of each and every page. If I change my links from ?lang=en&brand=Nokia to ="?lang=en&brand=Nokia#Nokia Google will start a new indexing when it sees that the URLs have changed

    besides, I tried it locally and I wonder why but it did not work :( I don't have a clue, maybe its because of the DIVs, I don't know :(
     
    ludwig, Oct 31, 2006 IP