Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can i have text that is always float: right with a horizontal scroll bar

I have a top navigation section at the top of a web page and I have some content that is setup as

 float: right;

this works great except that the content part of the page is now very wide (i have to set min-width: 1700px;)

the issue is now the float: right works great except when i scroll to the right, its no longer on the right.

my choices are either to:

  1. Make the top section min-width:1700px as well but them it would float right and it wouldn't be shown unless i scrolled to the right

Is there any way to have float: "rightofMonitor" so it would default to the right side of the monitor viewing screen but when i scrolled over horizontally it will keep moving right.

like image 623
leora Avatar asked Nov 14 '11 14:11

leora


2 Answers

You can use this : http://jsfiddle.net/XHRkS/

use the position:fixed; and right:0;

like image 147
GregM Avatar answered Sep 25 '22 18:09

GregM


Forget the floating. You should set the position to absolute and then set the right to 0.

like image 32
Nate B Avatar answered Sep 23 '22 18:09

Nate B