Added function to query element width.