Recently, I set up a tabbed content display on my website using CSS and HTML. This code is intended to be placed around halfway through a long page filled with other content.
For those who want to see it in action, here's the link to the jsFiddle: http://jsfiddle.net/ollyf/R9rq2/
While implementing this feature, I utilized the :target
attribute. However, I found myself struggling to fully grasp its functionality despite going through multiple tutorials. I suspect that there might be a better or more efficient approach to achieving the same tabbed content effect.
- Are there alternative methods that could make the implementation of this tabbed content more efficient?
- If not, how can I prevent the scroll position from jumping to the top of the DIV when revealing the content?