Skip to content

Styling elements nested within div's, in particular images #4199

Discussion options

You must be logged in to vote

Hi @johnperry-math,

Yes, the ui.image element (based on Quasar's QImg) is a bit tricky to configure. It is buried in divs - I guess to add elements like spinners and captions.

To add classes and style to the <img> tag itself, you can use the props "img-class" and "img-style". For specifying position and fit, there are "position" and "fit" props. See https://quasar.dev/vue-components/img#qimg-api > Props > Style for a complete list of available props.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by johnperry-math
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants