Applying dimension/material to multiple selected objects?


I’m new to blender. I’m wondering what I should do to apply things like dimension, position, and material to multiple selected objects?

If I press B and select multiple, say cubes. Changing dimension, or material will only apply to the last object of the selection in yellow. I need to apply, say the same width or the same X position to all selections. How do I manage to do that without doing it one by one?