display.contentWidth only half the screen?

local floor = display.newRect( 0, display.contentCenterY +150, display.contentWidth, 4 )

im trying to make the rectangle lined up with left side of screen, near bottom, going all the way across, 4 px high

my problem is the rectangle is only going half way across the screen and the x value isnt lined up properly. when I add numbers to x it moves the line right and if i move it over enough the line doesnt even cover the entire screen. 

Please help and thank you

edit, so to get the line to work for me I had to adjust x to 284 and display.contentWidth to 570 why wont display.contentWidth work as my width? I am very unsure about why i had to use 284 and 570 instead of 0 and display.contentWidth

display.newRect( display.contentCenterX, display.contentCenterY +150, display.contentWidth, 4 )

thanks horacebury. so if im understanding correctly display.contentCenterX just centers my rectangle on the screen?

Correct, but the creation of the rectangle, the first two parameters are the X, Y of the center of the object being created.

Rob

display.newRect( display.contentCenterX, display.contentCenterY +150, display.contentWidth, 4 )

thanks horacebury. so if im understanding correctly display.contentCenterX just centers my rectangle on the screen?

Correct, but the creation of the rectangle, the first two parameters are the X, Y of the center of the object being created.

Rob