The volume button works while in settings, OR the slider works? Because it COULD be your button has broken, I had that happen to me on an iPad once. What I started doing was using the accessibility controls from the control panel. That is, go to Settings, General, then Accessibility, then AssistiveTouch, and turn it on. This will give you on screen controls.