I have a grid which is 1px by 1px, with 1 subdivisions. I'd have thought that this would allow me to create and move objects on the page which always fell on numbers, not integers... i.e. 4px, not 4.309px.
As a UI designer, I'd never, ever have a div be set to 4.309px. Everything is rounded up. Since InDesign is so intent on being web-friendly, I'd have thought that this most basic of needs would be covered. Can I suggest, if there is no solution to this by other forum readers, that Adobe consider an option to the lines of "Intent: Print or Digital" and then guys like me can design away happier than ever.
It can't be that hard. Photoshop is doing it already, and recent versions even have the "Align Edges" option for vector shapes.
Do you have: View > Grids & Guides > Snap to Document Grid on?
Also usefull to make sure that your lines fall on the whole pixels.
By default a line is aligned to the centre of the stroke, causing it to cover 2 half pixels.
If you want to change that behaviour for the open document, make sure you have nothing selected and choose either Align Stroke to the Inside or Outside from the Stroke panel.
If you want that behaviour for all new documents:
Close all documents, select a stroke of 1 pt and change the Align in the stroke panel.
There are a couple of things you have to do if you want to draw and position objects as whole numbers.
Below I have my grid set to 100 pixels with 100 pixel increments, zoomed in to 600%. The object measurement and position depends on the Transform panel's transform anchor point, so you can't set the anchor point to one of the center points, you have to select one of the corners. The center point measures the x y as the center of the object.
Also, as Ton mentioned you have to set strokes to inside or outside and you should check Dimensions Include Stroke Weight from the Tranform flyout menu.
With this setup and with Snap to Grid selected, rectangles will snap to a 1 pixel grid as you draw them. If you are moving existing objects with your mouse, you have to be zoomed in for snapping to work, so setting your cursor key preference distance to 1 pixel and using your arrow keys can be better. Shift-arrow moves 10 pixels
In CS6 on OSX 10.8.5 if I turn off Snap to Grid and turn on Smart Guides with the setup I'm showing in #3, I always get whole numbers when I draw. The rulers have to be set to pixels–it looks to me like if units are set to pixels Smart Guides are smart enough to know you want whole pixels.