Reputation: 2131
I currently have a div layer that includes some javascript (to display a button). I'm trying to position it on my webpage relative to the right hand side of the screen - how can I do this? I currently have something like this:
<div id="LiveChat_1308239999" style="
top:500;
right:500;
position: absolute;
"><script type="text/javascript">
var __lc_buttons = __lc_buttons || [];
__lc_buttons.push({
elementId: 'LiveChat_1308239999',
language: 'en',
skill: '0'
});
(btw I do close the script and div, it just won't show up here)
But it is still just displaying in the top left corner of my screen.
Upvotes: 0
Views: 957
Reputation: 9037
You need to use a unit when specifying position values:
top: 500px;
right: 500px;
Also, specifying a right value of 500 will put it 500px to the left of the right hand side - is that what you wanted?
Upvotes: 3
Reputation: 1240
You are missing units, the browser doesn't know if 500 is 500px, 500em or 500%:
<div id="LiveChat_1308239999" style="
top:500px;
right:500px;
position: absolute;
">`
Upvotes: 2