[resolved] Centering image - found solution (3 posts)

  1. artifix
    Posted 3 years ago #

    My previous post was premature as it happens, but I had spent hours trying to work it the problem with no luck. Sometimes it's what you leave out that solves an issue, rather than what you add.
    In the first banner widget I had an <img> with class 'alignleft'.
    I needed the image to be center-aligned on mobile. I spent hours trying to work it out how to make it change.
    Finally, a solution arose, if it's any help to anyone, though it may just be elementary to some. By leaving out the <img class altogether, and having no class at all, just the <img> was a good start. Then put the <img> into a <p> tag. Still aligns left.
    At the end of the stylesheet it's then possible to add: .banner img {text-align: center;}. worked! The image is centered. Phew!

  2. Andrew Nevins
    Forum moderator
    Posted 3 years ago #

    In future you can reply to the threads you started with the solution.

  3. artifix
    Posted 3 years ago #

    Very sorry. I'm new to all this. I get the picture now tho'. Thanks.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic


No tags yet.