"Her only dress is black."
Translation:Sa seule robe est noire.
Some adjectives go in front of the noun, some go after, a small number can be placed in either position. Placing the adjective in front or after a noun is based on your intended meaning.
Adjectives which refer to the inherent, subjective, figurative qualities go in front. There is a tool called B.A.G.S. which helps capture that category of adjectives. (Beauty, Age, Goodness or badness, Size except when referring to people) Screening adjectives with B.A.G.S tool will help you quickly determine where to place adjectives because it indicates adjectives which have mostly subjective/figurative/inherent qualities.
Only (seul/e) goes in front in her only dress because she may well have other dresses. She may be using them for rags, they may be soiled, they may be out of fashion so she won't wear them, she may not have them with her so they are not available. Only means just that she has no others for the purposes of the discussion that is being held. It may be that there really are no other dresses but maybe not. Subjective, figurative, inherent.
Objective/literal/classifying adjectives go after the noun. Seul/e placed after the noun changes the meaning from subjective only to objective alone. That's because robe seule means the dress is literally, objectively alone. There are actually no other black objects present. Some objects are classified as black (her dress) and all others are classified as not black. Objective, literal, classifying.
Most adjectives, except for the B.A.G.S. grouping, go after the noun.
You changed the sentence by adding the verb to have (avoir) to the verb to be (être). To make that work you changed sa to elle, added que and moved the subject from the beginning of the sentence to the middle.
The result is that the sentence is no longer about the dress but is now about what she has, which just happens to be a dress. It is not the sentence you were given to translate.
Other than that it was pretty good.