views:

21

answers:

1

I am trying to develop my first python web project. It have multiple tabs (like apple.com have Store, iPhone, iPad etc tabs) and when user click on any tab, the page is served from server. I want to make sure that the selected tab will have different background color when page is loaded. Which is a best way to do it? JavaScript/CSS/Directly from server? and How? Thanks.

+1  A: 

I think the best way would be through CSS. You can handle it by adding the pseudoclass :active to the CSS.

Other way is serving the page with a new class added to the tab, which will change the background color, but I would not recommend that.

Oscar Carballal
Thanks @Oscar!!
Cool