tags:

views:

29

answers:

1

I want the following code to always be in top right, regardless of the size (i.e. when the user resizes the browser window, it is still in the same position):

<div id="navbar"><a href="#">Our Blog</a></div>

The CSS that accompanies this as follows:

#navbar {
    position: absolute;
    left: 850px;
    width: 100px;
    padding: 15px 0 0 0;    
}

I would like to do it in CSS and HTML only.

+3  A: 

change it from being positioned form the left to be positioned from the right...

#navbar {
  position: absolute;
  right: 0;
  width: 100px;
  padding:  15px 0 0 0;
}
davidsleeps
Of course! Brilliant!Thanks much meng.
marcamillion
@marcamillion - you should accept his answer if it solved your problem.
Wade Williams
I know. I am going to. But 1 minute remaining before I can do that. So I upvoted him in the meanwhile :)
marcamillion