The issue is not if fits in motherboard, but if fits in the case, that is what you need to ask for and the compatibility between rx460 and rx580 they are not so much diferent, unless the psu that they require.

Also be aware that most Video Cards are not reference and will vary in length greatly. For instance XFX makes a handfull of different RX 580s all have different lengths. Always make sure to check those card specs. To mimic an old carpenter saying, measure twice, install once!