Is there a way to align an image (to the center, to the right, to the left).
I know there is a way to do it with classes but students just has one images and is not on the classes lesson yet.
There are a number of ways to center an image. Perhaps one of the easier ones for a beginner would be to put it inside a container (such as a div, but could be any container)
and then use css to style that container with text-align: center;
This would also work for left or right alignment.
Here’s a working example:
https://codeprojects.org/projects/weblab/syGdp8oCGdosriCofyYhImomvGg5HiN9pIq56pYs44A
good luck!
Mike
1 Like
Students also learn how to use the float property in Lesson 11. This won’t help the student center an image, but it is an easy way to move it left or right of text.
1 Like