Hi,
I am creating a tab strip dynamically. I have some 5-6 tabs at the rootlevel. In my last tab i am creating a tab template which will have normal HTML controls for example a Logout link and someother links like that. My requirement is that the contents of my last tab should be always at the right most corner of the screen. Please refer the attached image of expected output. It should be like that on screen resize also, i mean in every situation they should be at the right most corner.
Currently i am doing it by calculating its offsetLeft and setting the paddingleft style property for the last tab dynamically on page load and on window resize event. Following is my code for that
paddingLeft = tabStrip.get_element().offsetWidth - lastTab.get_element().offsetLeft - 80; // 80 is the width of the logout link
lastTab.get_element().style.paddingLeft = paddingLeft;
But, it seems to break sometimes.
Please, suggest some more elegant way of doing it.
Thanx in advance.
Mohammad.