0

So I have a pure CSS and HTML timeline (http://cssdesk.com/a5NVw) with a scroll bar by implementing overflow:scroll. However to get it to start at the latest event I have to have the scroll bar start at the full right rather than full left position. I've tried using direction:rtl to do this (first time I've used this attribute) however it makes the content overflowing on the right-hand side just become hidden. I assume this is due to it implementing the scrollbar before checking the position of the sub-elements - how should I resolve this?

It has been mentioned that my explanation isn't clear so here is a summary of the issues:

  • Have a timeline that I want to be scrollable.
  • Want the scrollbar to default to the right rather than the left (so
    it shows most recent by default).
  • Tried using direction:rtl to start the scrollbar on the right.
  • However this led to the contents that would normally be scrolled
    right for overflowing on the right instead.

As for my example not working - that's precisely the issue. If you remove the directional attributes it works fine, however it starts on the left which is where I started on this. I want to try and use a pure CSS solution for it although I know that a JQuery solution might be more expedient - and I may well end up resorting to that if I no one knows how to implement this method.

Greg
  • 18,111
  • 5
  • 46
  • 68
  • Your example doesn't seem to be working – Turnip Jun 25 '14 at 15:25
  • i don't understand your problem because your explanation is not clear and also your example don't show a clear problem, please clarify what in specific is your problem... – MickyScion Jun 25 '14 at 15:28
  • Can you use Javascript? I can't find another way to do it. In that case, you should take a look here: http://stackoverflow.com/questions/9659343/how-can-i-make-a-html-scrollbar-start-at-the-bottom – sailens Jun 25 '14 at 15:34
  • Added some more clarification in bullet form, although not sure how to clarify it any more beyond that. As for jquery I am trying to avoid using it if I can, since _in theory_ this should be possible using pure css. Might well end up using jquery if no one knows how to solve it however. – user2174133 Jun 25 '14 at 16:09

1 Answers1

0

you have to use javascript to scroll it to right. you cant have a default scroll set by css.

user3754372
  • 177
  • 16