Resizing page - Div in place using percentage based width

wec

New Member
So I have a div that stick at the top right hand corner of my screen.I can make the div stay at the top right hand corner using the following CSS:\[code\].dockbar { background: #000000; width:300px; float:right; position: absolute; left:1180px; top:10px; height:38px;}\[/code\]But I hate this approach because the div has space to the right if the screen is larger. I would prefer to using percentage based sizing, but doing that causes the div to move with the screen (because of the percentage..)Is there a way to position a div at the top right hand corner:
  • Without using fixed positioning
  • Without declaring exact pixel based positioning
Thanks
 
Back
Top