CSS Position not working when specifying Top / Bottom / Left / Right

css, css-position, position

Solution

You should use `px` or another units, like `%`, `em`, `pt` etc when you set numerical values in css.

Problem

Specifying a value greater than, or less than zero for top/bottom/left/right has no effect. Created an id that specifies `position: absolute`. I can also declare locations but only with zero values i.e. `top: 0` or `right: 0`. Nothing happens though when I specify `right:50`. I can't work out why. I've stripped nearly everything out of my document. Here's the CSS: ``` #index-content { position:absolute; top:349; right:0; background-color: fuchsia; } ``` Here's the HTML: ``` <body> <div id="index-content">The Title</div> </body> ```

Original source