Foods should be bland, low in fat, and low in fiber. Because fat is harder for the stomach to digest, avoid fatty foods as much as possible. Foods that are.
If not possible then take one hour before and two hours after food. However, iron tablets can upset your stomach, causing either constipation or diarrhoea.
It's best to take antacids with food or soon after eating because this is when you're most likely to get indigestion or heartburn. The effect of the medicine.