Home › Forums › Support › text under image This topic has 5 replies, 3 voices, and was last updated 4 years ago by Leo. Viewing 6 posts - 1 through 6 (of 6 total) Author Posts April 21, 2020 at 3:37 am #1247670 Brian Hi, Is it possible to have text under an image to be the same width as the image? the image is 768px wide. I have tried max- width but I can’t get it to centre for me, even though I use the text-align attribute. I would appreciate the help. Kind Regards, Brian Thompson April 21, 2020 at 7:49 am #1247952 DavidStaff Customer Support Hi there, you have an opening DIV: <div align="center"> Change that to: <div class="custom-container"> Then add this CSS: .custom-container { max-width: 768px; margin-left: auto; margin-right: auto; text-align: center; } .custom-container img { width: 100%; } The second part of the CSS is to make your images respond to screen size changes. April 21, 2020 at 12:55 pm #1248439 Brian Hi David, Thank you very much! I didn’t know what to do. One question though, what is meant by the auto attribute? April 21, 2020 at 12:57 pm #1248443 LeoStaff Customer Support See explanation here: https://www.w3schools.com/css/css_margin.asp In this case it just centers the element. April 21, 2020 at 1:12 pm #1248462 Brian Thank you Leo, I have seen it in use on other sites but I didn’t really know what it meant. Kind Regards, Brian Thompson April 21, 2020 at 1:31 pm #1248486 LeoStaff Customer Support No problem 🙂 Author Posts Viewing 6 posts - 1 through 6 (of 6 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In